mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-10 21:25:24 +03:00
Rename to reviews and redirect events to reviews
This commit is contained in:
parent
27edd7df6e
commit
a0bef85c11
@ -7,6 +7,7 @@ import { isDesktop, isMobile } from "react-device-detect";
|
|||||||
import Statusbar from "./components/Statusbar";
|
import Statusbar from "./components/Statusbar";
|
||||||
import Bottombar from "./components/navigation/Bottombar";
|
import Bottombar from "./components/navigation/Bottombar";
|
||||||
import { Suspense, lazy } from "react";
|
import { Suspense, lazy } from "react";
|
||||||
|
import { Redirect } from "./components/navigation/Redirect";
|
||||||
|
|
||||||
const Live = lazy(() => import("@/pages/Live"));
|
const Live = lazy(() => import("@/pages/Live"));
|
||||||
const Events = lazy(() => import("@/pages/Events"));
|
const Events = lazy(() => import("@/pages/Events"));
|
||||||
@ -35,7 +36,8 @@ function App() {
|
|||||||
<Suspense>
|
<Suspense>
|
||||||
<Routes>
|
<Routes>
|
||||||
<Route path="/" element={<Live />} />
|
<Route path="/" element={<Live />} />
|
||||||
<Route path="/events" element={<Events />} />
|
<Route path="/events" element={<Redirect to="/reviews" />} />
|
||||||
|
<Route path="/reviews" element={<Events />} />
|
||||||
<Route path="/export" element={<Export />} />
|
<Route path="/export" element={<Export />} />
|
||||||
<Route path="/plus" element={<SubmitPlus />} />
|
<Route path="/plus" element={<SubmitPlus />} />
|
||||||
<Route path="/system" element={<System />} />
|
<Route path="/system" element={<System />} />
|
||||||
|
|||||||
14
web/src/components/navigation/Redirect.tsx
Normal file
14
web/src/components/navigation/Redirect.tsx
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
import { useEffect } from "react";
|
||||||
|
import { useNavigate } from "react-router-dom";
|
||||||
|
|
||||||
|
type RedirectProps = {
|
||||||
|
to: string;
|
||||||
|
};
|
||||||
|
export function Redirect({ to }: RedirectProps) {
|
||||||
|
const navigate = useNavigate();
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
navigate(to);
|
||||||
|
}, [to, navigate]);
|
||||||
|
return <div />;
|
||||||
|
}
|
||||||
@ -1,5 +1,6 @@
|
|||||||
import Logo from "@/components/Logo";
|
import Logo from "@/components/Logo";
|
||||||
import { FaCompactDisc, FaFlag, FaVideo } from "react-icons/fa";
|
import { FaCompactDisc, FaVideo } from "react-icons/fa";
|
||||||
|
import { TbTimelineEventFilled } from "react-icons/tb";
|
||||||
import { LuConstruction } from "react-icons/lu";
|
import { LuConstruction } from "react-icons/lu";
|
||||||
|
|
||||||
export const navbarLinks = [
|
export const navbarLinks = [
|
||||||
@ -11,9 +12,9 @@ export const navbarLinks = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
icon: FaFlag,
|
icon: TbTimelineEventFilled,
|
||||||
title: "Events",
|
title: "Reviews",
|
||||||
url: "/events",
|
url: "/reviews",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 3,
|
id: 3,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user