mirror of
https://github.com/lemeow125/Ivy-Frontend.git
synced 2024-11-16 22:29:24 +08:00
Added other routes. No way to navigate to them yet
This commit is contained in:
parent
32e7ab8830
commit
1a1b334f7d
3 changed files with 33 additions and 0 deletions
|
@ -1,5 +1,7 @@
|
|||
import React from "react";
|
||||
import Dashboard from "./Routes/Dashboard/Dashboard";
|
||||
import Error from "./Routes/Error/Error";
|
||||
import Products from "./Routes/Products/Products";
|
||||
import Header from "./Components/Header/Header";
|
||||
import Container from "./Components/Container/Container";
|
||||
import { createBrowserRouter, RouterProvider } from "react-router-dom";
|
||||
|
@ -10,6 +12,11 @@ const router = createBrowserRouter([
|
|||
{
|
||||
path: "/",
|
||||
element: <Dashboard />,
|
||||
errorElement: <Error />,
|
||||
},
|
||||
{
|
||||
path: "/Products",
|
||||
element: <Products />,
|
||||
},
|
||||
]);
|
||||
|
||||
|
|
13
src/routes/Error/Error.tsx
Normal file
13
src/routes/Error/Error.tsx
Normal file
|
@ -0,0 +1,13 @@
|
|||
import React from "react";
|
||||
import AppLogo from "../../Components/Icons/AppLogo/AppLogo";
|
||||
import styles from "../../styles";
|
||||
|
||||
export default function Error() {
|
||||
return (
|
||||
<div style={styles.container}>
|
||||
<AppLogo size={64} color="#6f9b78" />
|
||||
<p style={styles.text}>Ivy - Inventory Manager</p>
|
||||
<p style={styles.text}>Error 404: Page Not Found</p>
|
||||
</div>
|
||||
);
|
||||
}
|
13
src/routes/Products/Products.tsx
Normal file
13
src/routes/Products/Products.tsx
Normal file
|
@ -0,0 +1,13 @@
|
|||
import React from "react";
|
||||
import styles from "../../styles";
|
||||
import AppLogo from "../../Components/Icons/AppLogo/AppLogo";
|
||||
|
||||
export default function Products() {
|
||||
return (
|
||||
<div style={styles.container}>
|
||||
<AppLogo size={64} color="#6f9b78" />
|
||||
<p style={styles.text}>Ivy - Inventory Manager</p>
|
||||
<p style={styles.text}>Products Page</p>
|
||||
</div>
|
||||
);
|
||||
}
|
Loading…
Reference in a new issue