feat: add new about page
This commit is contained in:
9 files changed
+238
-48
No files matched your search
@@ -1,29 +1,25 @@
|
||||
import { useBackdropStore } from "@/utils/store/backdrop";
|
||||
import {
|
||||
Link,
|
||||
Outlet,
|
||||
createFileRoute,
|
||||
useNavigate,
|
||||
} from "@tanstack/react-router";
|
||||
import { createFileRoute, Outlet, useNavigate } from "@tanstack/react-router";
|
||||
import React, { useCallback, useEffect } from "react";
|
||||
import { useBackdropStore } from "@/utils/store/backdrop";
|
||||
|
||||
import "./settings.scss";
|
||||
import { Divider, IconButton, List, Typography } from "@mui/material";
|
||||
import { useShallow } from "zustand/shallow";
|
||||
import BackButton from "@/components/buttons/backButton";
|
||||
import ListItemLink from "@/components/listItemLink";
|
||||
import { useApiInContext } from "@/utils/store/api";
|
||||
import { useCentralStore } from "@/utils/store/central";
|
||||
import { Button, Divider, IconButton, List, Typography } from "@mui/material";
|
||||
|
||||
export const Route = createFileRoute("/_api/settings")({
|
||||
component: SettingsRoute,
|
||||
});
|
||||
|
||||
function SettingsRoute() {
|
||||
const setBackdrop = useBackdropStore((s) => s.setBackdrop);
|
||||
const setBackdrop = useBackdropStore(useShallow((s) => s.setBackdrop));
|
||||
const api = useApiInContext((s) => s.api);
|
||||
const user = useCentralStore((s) => s.currentUser);
|
||||
useEffect(() => {
|
||||
setBackdrop("", "none");
|
||||
setBackdrop("");
|
||||
});
|
||||
const navigate = useNavigate();
|
||||
const handleNavigateHome = useCallback(() => {
|
||||
@@ -67,6 +63,12 @@ function SettingsRoute() {
|
||||
primary="Preferences"
|
||||
className="settings-sidebar-list-item"
|
||||
/>
|
||||
<ListItemLink
|
||||
to="/settings/about"
|
||||
icon="info"
|
||||
primary="About"
|
||||
className="settings-sidebar-list-item"
|
||||
/>
|
||||
</List>
|
||||
</div>
|
||||
<Outlet />
|
||||
|
||||
Reference in new issue
Block a user