mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 01:01:56 +00:00
adjust layout
This commit is contained in:
parent
f99e874072
commit
7a45f010fa
|
@ -15,10 +15,6 @@ const Home: NextPage = () => {
|
|||
</Head>
|
||||
|
||||
<main className={styles.main}>
|
||||
<h1 className={styles.title}>
|
||||
Welcome to <a href="https://nextjs.org">Next.js!</a>
|
||||
</h1>
|
||||
|
||||
<StockChart> </StockChart>
|
||||
</main>
|
||||
</div>
|
||||
|
|
|
@ -69,20 +69,20 @@ interface WithOHLCState {
|
|||
message: string;
|
||||
}
|
||||
|
||||
export function withOHLCData(dataSet = "DAILY") {
|
||||
export function withOHLCData(interval : string = "5m") {
|
||||
return <TProps extends WithOHLCDataProps>(OriginalComponent: React.ComponentClass<TProps>) => {
|
||||
return class WithOHLCData extends React.Component<Omit<TProps, "data">, WithOHLCState> {
|
||||
public constructor(props: Omit<TProps, "data">) {
|
||||
super(props);
|
||||
|
||||
this.state = {
|
||||
message: `Loading ${dataSet} data...`,
|
||||
message: `Loading price data...`,
|
||||
};
|
||||
}
|
||||
|
||||
public componentDidMount() {
|
||||
fetch(
|
||||
`https://raw.githubusercontent.com/reactivemarkets/react-financial-charts/master/packages/stories/src/data/${dataSet}.tsv`,
|
||||
`/data/klines/ETHUSDT-5m.csv`,
|
||||
)
|
||||
.then((response) => response.text())
|
||||
.then((data) => tsvParse(data, parseData()))
|
||||
|
@ -276,12 +276,12 @@ class StockChart extends React.Component<StockChartProps> {
|
|||
};
|
||||
}
|
||||
|
||||
export default withOHLCData()(withSize({ style: { minHeight: 600 } })(withDeviceRatio()(StockChart)));
|
||||
export default withOHLCData()(withSize({ style: { minHeight: 400 } })(withDeviceRatio()(StockChart)));
|
||||
|
||||
export const MinutesStockChart = withOHLCData("MINUTES")(
|
||||
withSize({ style: { minHeight: 600 } })(withDeviceRatio()(StockChart)),
|
||||
withSize({ style: { minHeight: 400 } })(withDeviceRatio()(StockChart)),
|
||||
);
|
||||
|
||||
export const SecondsStockChart = withOHLCData("SECONDS")(
|
||||
withSize({ style: { minHeight: 600 } })(withDeviceRatio()(StockChart)),
|
||||
withSize({ style: { minHeight: 400 } })(withDeviceRatio()(StockChart)),
|
||||
);
|
||||
|
|
|
@ -23,34 +23,6 @@
|
|||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.title a {
|
||||
color: #0070f3;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.title a:hover,
|
||||
.title a:focus,
|
||||
.title a:active {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.title {
|
||||
margin: 0;
|
||||
line-height: 1.15;
|
||||
font-size: 4rem;
|
||||
}
|
||||
|
||||
.title,
|
||||
.description {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.description {
|
||||
margin: 4rem 0;
|
||||
line-height: 1.5;
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.code {
|
||||
background: #fafafa;
|
||||
border-radius: 5px;
|
||||
|
|
Loading…
Reference in New Issue
Block a user