blob: 4e08a1765b10f72e7acc3041a26138fba2259440 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
import React from 'react';
import { Routes, Route, Navigate, Link} from 'react-router-dom';
import MarketDataPage from './MarketDataPage';
import BidsPage from './BidsPage';
import SubmitBidPage from './SubmitBidPage';
import { Menu } from '@arco-design/web-react';
import { PageHeader, Typography } from '@arco-design/web-react';
import '@arco-design/web-react/dist/css/arco.css';
const ghostBgStyle = {
backgroundImage: 'radial-gradient(var(--color-fill-3) 1px, rgba(0, 0, 0, 0) 1px)',
backgroundSize: '16px 16px',
padding: 20,
};
function App() {
return (
<div>
<style>
{`
@media (max-width: 600px) {
.page-header-title {
font-size: 20px !important;
text-align: center;
}
.page-header-subtitle {
font-size: 14px !important;
text-align: center;
}
}
`}
</style>
<div style={ghostBgStyle}>
<PageHeader
title={
<Typography.Title heading={3} className="page-header-title">
PolyEnergy
</Typography.Title>
}
subTitle={
<Typography.Title type="secondary" heading={4} className="page-header-subtitle">
Virtual Energy Trading
</Typography.Title>
}
/>
<Menu mode="horizontal" defaultSelectedKeys={['market-data']}>
<Menu.Item key="market-data">
<Link to="/market-data">Market Data</Link>
</Menu.Item>
<Menu.Item key="submit-bid">
<Link to="/submit-bid">Submit Bid</Link>
</Menu.Item>
<Menu.Item key="bids">
<Link to="/bids">My Bids</Link>
</Menu.Item>
</Menu>
</div>
<Routes>
<Route path="/" element={<Navigate to="/market-data" replace />} />
<Route path="/market-data" element={<MarketDataPage />} />
<Route path="/submit-bid" element={<SubmitBidPage />} />
<Route path="/bids" element={<BidsPage />} />
</Routes>
</div>
);
}
export default App;
|