Added other routes. No way to navigate to them yet

This commit is contained in:
Keannu Bernasol 2023-02-15 00:32:29 +08:00
parent 32e7ab8830
commit 1a1b334f7d
3 changed files with 33 additions and 0 deletions

View file

@ -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 />,
},
]);

View 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>
);
}

View 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>
);
}