mirror of
https://github.com/lemeow125/Ivy-Frontend.git
synced 2024-11-17 06:39:25 +08:00
Added routing structure and polished Dashboard
This commit is contained in:
parent
4e2fb294c2
commit
576a5bab9b
3 changed files with 38 additions and 26 deletions
20
src/App.tsx
20
src/App.tsx
|
@ -1,15 +1,17 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import AppLogo from "./components/Icons/AppLogo/AppLogo";
|
import Dashboard from "./routes/Dashboard/Dashboard";
|
||||||
import styles from "./styles";
|
import { createBrowserRouter, RouterProvider } from "react-router-dom";
|
||||||
|
|
||||||
|
const router = createBrowserRouter([
|
||||||
|
{
|
||||||
|
path: "/",
|
||||||
|
element: <Dashboard />,
|
||||||
|
},
|
||||||
|
]);
|
||||||
export default function App() {
|
export default function App() {
|
||||||
return (
|
return (
|
||||||
<div style={styles.background}>
|
<React.StrictMode>
|
||||||
<div style={styles.flex_row}>
|
<RouterProvider router={router} />
|
||||||
<AppLogo size={64} color="#6f9b78" />
|
</React.StrictMode>
|
||||||
<p>Ivy - Inventory Manager</p>
|
|
||||||
</div>
|
|
||||||
<p>Welcome!</p>
|
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
16
src/routes/Dashboard/Dashboard.tsx
Normal file
16
src/routes/Dashboard/Dashboard.tsx
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
import React from "react";
|
||||||
|
import AppLogo from "../../components/Icons/AppLogo/AppLogo";
|
||||||
|
import "../../index.css";
|
||||||
|
import styles from "../../styles";
|
||||||
|
|
||||||
|
export default function Dashboard() {
|
||||||
|
return (
|
||||||
|
<div style={styles.background}>
|
||||||
|
<div style={styles.container}>
|
||||||
|
<AppLogo size={64} color="#6f9b78" />
|
||||||
|
<p style={styles.text}>Ivy - Inventory Manager</p>
|
||||||
|
<p style={styles.text}>Welcome to the Dashboard</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
|
@ -1,27 +1,21 @@
|
||||||
import React from "react";
|
|
||||||
const styles: { [key: string]: React.CSSProperties } = {
|
const styles: { [key: string]: React.CSSProperties } = {
|
||||||
background: {
|
background: {
|
||||||
backgroundColor: "#0b2322",
|
backgroundColor: "#0b2322",
|
||||||
height: "100vh",
|
|
||||||
display: "flex",
|
display: "flex",
|
||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
justifyContent: "center",
|
height: "100vh",
|
||||||
|
},
|
||||||
|
container: {
|
||||||
|
display: "flex",
|
||||||
|
flexDirection: "column",
|
||||||
|
flex: 1,
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
fontWeight: "bold",
|
},
|
||||||
|
text: {
|
||||||
|
fontSize: 16,
|
||||||
color: "white",
|
color: "white",
|
||||||
},
|
fontWeight: "bold",
|
||||||
flex_row: {
|
|
||||||
display: "flex",
|
|
||||||
flexDirection: "row",
|
|
||||||
justifyContent: "center",
|
|
||||||
alignItems: "center",
|
|
||||||
},
|
|
||||||
header: {
|
|
||||||
display: "flex",
|
|
||||||
flexDirection: "row",
|
|
||||||
position: "sticky",
|
|
||||||
top: 0,
|
|
||||||
left: 0,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export default styles;
|
export default styles;
|
||||||
|
|
Loading…
Reference in a new issue