Skip to content

Commit 8b432da

Browse files
committed
add app js
1 parent 2214227 commit 8b432da

2 files changed

Lines changed: 113 additions & 0 deletions

File tree

src/.DS_Store

6 KB
Binary file not shown.

src/admin/client/app.js

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
import React from 'react';
2+
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';
3+
4+
import Head from 'modules/head';
5+
import Login from 'routes/login';
6+
import Logout from 'routes/logout';
7+
import Home from 'routes/home';
8+
import NotFound from 'routes/notFound';
9+
import Products from 'routes/products';
10+
import ProductDetails from 'routes/products/edit';
11+
import ProductCategories from 'routes/products/categories';
12+
import Customers from 'routes/customers';
13+
import CustomerDetails from 'routes/customers/edit';
14+
import CustomerGroups from 'routes/customers/groups';
15+
import Orders from 'routes/orders';
16+
import OrderDetails from 'routes/orders/edit';
17+
import OrderStatuses from 'routes/orders/statuses';
18+
import Pages from 'routes/pages';
19+
import PagesDetails from 'routes/pages/edit';
20+
import Settings from 'routes/settings';
21+
import Apps from 'routes/apps';
22+
import Files from 'routes/files';
23+
24+
import {
25+
blue700,
26+
cyan700,
27+
pinkA200,
28+
grey100,
29+
grey300,
30+
grey400,
31+
white,
32+
darkBlack,
33+
fullBlack
34+
} from 'material-ui/styles/colors';
35+
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
36+
import getMuiTheme from 'material-ui/styles/getMuiTheme';
37+
38+
const muiTheme = getMuiTheme({
39+
fontFamily: 'Roboto, sans-serif',
40+
palette: {
41+
primary1Color: blue700,
42+
primary2Color: cyan700,
43+
primary3Color: grey400,
44+
accent1Color: pinkA200,
45+
accent2Color: grey100,
46+
accent3Color: blue700,
47+
textColor: darkBlack,
48+
alternateTextColor: white,
49+
canvasColor: white,
50+
borderColor: grey300,
51+
pickerHeaderColor: blue700,
52+
shadowColor: fullBlack
53+
},
54+
appBar: {}
55+
});
56+
57+
export default () => (
58+
<Router>
59+
<MuiThemeProvider muiTheme={muiTheme}>
60+
<div id="container">
61+
<div id="headContainer">
62+
<Head />
63+
</div>
64+
<div id="bodyContainer">
65+
<Switch>
66+
<Route path="/admin/" exact component={Home} />
67+
<Route path="/admin/login" component={Login} />
68+
<Route path="/admin/logout" component={Logout} />
69+
<Route path="/admin/products" exact component={Products} />
70+
<Route
71+
path="/admin/products/categories"
72+
exact
73+
component={ProductCategories}
74+
/>
75+
<Route path="/admin/orders" exact component={Orders} />
76+
<Route
77+
path="/admin/orders/statuses"
78+
exact
79+
component={OrderStatuses}
80+
/>
81+
<Route
82+
path="/admin/order/:orderId"
83+
exact
84+
component={OrderDetails}
85+
/>
86+
<Route path="/admin/customers" exact component={Customers} />
87+
<Route
88+
path="/admin/customers/groups"
89+
exact
90+
component={CustomerGroups}
91+
/>
92+
<Route
93+
path="/admin/customer/:customerId"
94+
exact
95+
component={CustomerDetails}
96+
/>
97+
<Route
98+
path="/admin/product/:productId"
99+
component={ProductDetails}
100+
/>
101+
<Route path="/admin/pages" exact component={Pages} />
102+
<Route path="/admin/pages/add" exact component={PagesDetails} />
103+
<Route path="/admin/pages/:pageId" component={PagesDetails} />
104+
<Route path="/admin/settings" component={Settings} />
105+
<Route path="/admin/apps" component={Apps} />
106+
<Route path="/admin/files" exact component={Files} />
107+
<Route component={NotFound} />
108+
</Switch>
109+
</div>
110+
</div>
111+
</MuiThemeProvider>
112+
</Router>
113+
);

0 commit comments

Comments
 (0)