bbgo_origin/apps/bbgo-backtest-report/pages/index.tsx

31 lines
905 B
TypeScript
Raw Normal View History

2022-05-16 17:53:51 +00:00
import type {NextPage} from 'next'
2022-05-06 05:47:13 +00:00
import Head from 'next/head'
import styles from '../styles/Home.module.css'
2022-05-17 17:53:48 +00:00
import ReportDetails from '../components/ReportDetails';
import ReportNavigator from '../components/ReportNavigator';
import {useState} from "react";
2022-05-11 11:51:31 +00:00
2022-05-06 05:47:13 +00:00
const Home: NextPage = () => {
2022-05-17 17:53:48 +00:00
const [currentReport, setCurrentReport] = useState<any>();
2022-05-06 05:47:13 +00:00
return (
<div className={styles.container}>
<Head>
2022-05-16 14:24:25 +00:00
<title>Back-Test Report</title>
2022-05-16 17:53:51 +00:00
<meta name="description" content="Generated by create next app"/>
<link rel="icon" href="/favicon.ico"/>
2022-05-06 05:47:13 +00:00
</Head>
<main className={styles.main}>
2022-05-17 17:53:48 +00:00
<ReportNavigator onSelect={(reportEntry) => {
setCurrentReport(reportEntry)
}}/>
{
currentReport ? <ReportDetails basePath={'/output'} runID={currentReport.id}/> : null
}
2022-05-06 05:47:13 +00:00
</main>
</div>
)
}
export default Home