mirror of
https://github.com/lemeow125/Borrowing-TrackerFrontend.git
synced 2024-11-17 06:19:27 +08:00
Improved dashboard
This commit is contained in:
parent
553156ef7c
commit
26dc30f59d
4 changed files with 37 additions and 0 deletions
22
src/App.tsx
22
src/App.tsx
|
@ -11,6 +11,8 @@ import DashboardPage from "./Pages/DashboardPage/DashboardPage";
|
||||||
import Revalidator from "./Components/Revalidator/Revalidator";
|
import Revalidator from "./Components/Revalidator/Revalidator";
|
||||||
import ActivationPage from "./Pages/ActivationPage/ActivationPage";
|
import ActivationPage from "./Pages/ActivationPage/ActivationPage";
|
||||||
import ResetPasswordPage from "./Pages/ResetPasswordPage/ResetPasswordPage";
|
import ResetPasswordPage from "./Pages/ResetPasswordPage/ResetPasswordPage";
|
||||||
|
import EquipmentInstancesListPage from "./Pages/EquipmentInstancesListPage/EquipmentInstancesListPage";
|
||||||
|
import AddEquipmentInstancePage from "./Pages/AddEquipmentInstancePage/AddEquipmentInstancePage";
|
||||||
|
|
||||||
const queryClient = new QueryClient();
|
const queryClient = new QueryClient();
|
||||||
const router = createHashRouter([
|
const router = createHashRouter([
|
||||||
|
@ -34,6 +36,26 @@ const router = createHashRouter([
|
||||||
),
|
),
|
||||||
errorElement: <ErrorPage />,
|
errorElement: <ErrorPage />,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: "/view/equipment_instances",
|
||||||
|
element: (
|
||||||
|
<>
|
||||||
|
<Revalidator />
|
||||||
|
<EquipmentInstancesListPage />
|
||||||
|
</>
|
||||||
|
),
|
||||||
|
errorElement: <ErrorPage />,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/add/equipment_instance",
|
||||||
|
element: (
|
||||||
|
<>
|
||||||
|
<Revalidator />
|
||||||
|
<AddEquipmentInstancePage />
|
||||||
|
</>
|
||||||
|
),
|
||||||
|
errorElement: <ErrorPage />,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: "/activation/:uid/:token",
|
path: "/activation/:uid/:token",
|
||||||
element: (
|
element: (
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
export default function AddEquipmentInstancePage() {
|
||||||
|
return <div>{"AddEquipmentInstancePage"}</div>;
|
||||||
|
}
|
|
@ -10,7 +10,10 @@ import ChairIcon from "@mui/icons-material/Chair";
|
||||||
import FormatListBulletedIcon from "@mui/icons-material/FormatListBulleted";
|
import FormatListBulletedIcon from "@mui/icons-material/FormatListBulleted";
|
||||||
import AddToQueueIcon from "@mui/icons-material/AddToQueue";
|
import AddToQueueIcon from "@mui/icons-material/AddToQueue";
|
||||||
import { colors } from "../../styles";
|
import { colors } from "../../styles";
|
||||||
|
import { useNavigate } from "react-router-dom";
|
||||||
export default function Dashboard() {
|
export default function Dashboard() {
|
||||||
|
const navigate = useNavigate();
|
||||||
|
|
||||||
const queries = useQueries({
|
const queries = useQueries({
|
||||||
queries: [
|
queries: [
|
||||||
{
|
{
|
||||||
|
@ -238,6 +241,9 @@ export default function Dashboard() {
|
||||||
flexWrap: "wrap",
|
flexWrap: "wrap",
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
|
onClick={() => {
|
||||||
|
navigate("/view/equipment_instances");
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<FormatListBulletedIcon
|
<FormatListBulletedIcon
|
||||||
style={{
|
style={{
|
||||||
|
@ -266,6 +272,9 @@ export default function Dashboard() {
|
||||||
flexWrap: "wrap",
|
flexWrap: "wrap",
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
|
onClick={() => {
|
||||||
|
navigate("/add/equipment_instance");
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<AddToQueueIcon
|
<AddToQueueIcon
|
||||||
style={{
|
style={{
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
export default function EquipmentInstancesListPage() {
|
||||||
|
return <div>{"EquipmentInstancesListPage"}</div>;
|
||||||
|
}
|
Loading…
Reference in a new issue