Added redirection on homepage
This commit is contained in:
parent
b02bf1018a
commit
6df91f3adc
|
|
@ -5,7 +5,7 @@ const sidebarMenus: SidebarMenu[] = [
|
||||||
label: "Dashboard",
|
label: "Dashboard",
|
||||||
icon: { tb: "TbLayoutDashboard" },
|
icon: { tb: "TbLayoutDashboard" },
|
||||||
allowedPermissions: ["*"],
|
allowedPermissions: ["*"],
|
||||||
link: "/",
|
link: "/dashboard",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Users",
|
label: "Users",
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,19 @@
|
||||||
import { createLazyFileRoute } from "@tanstack/react-router";
|
import { createLazyFileRoute, useNavigate } from "@tanstack/react-router";
|
||||||
|
import { useEffect } from "react";
|
||||||
|
|
||||||
export const Route = createLazyFileRoute("/")({
|
export const Route = createLazyFileRoute("/")({
|
||||||
component: () => <div className="text-red-500">Hello !</div>,
|
component: HomePage,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
export default function HomePage() {
|
||||||
|
const navigate = useNavigate();
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
navigate({
|
||||||
|
to: "/dashboard",
|
||||||
|
replace: true,
|
||||||
|
});
|
||||||
|
}, [navigate]);
|
||||||
|
|
||||||
|
return <div>index.lazy</div>;
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user