diff --git a/src/app/dashboard/(admin)/admin/(settings)/settings/_components/layout/sidebar/index.tsx b/src/app/dashboard/(admin)/admin/(settings)/settings/_components/layout/sidebar/index.tsx index f65b5e87f..d639a3af5 100644 --- a/src/app/dashboard/(admin)/admin/(settings)/settings/_components/layout/sidebar/index.tsx +++ b/src/app/dashboard/(admin)/admin/(settings)/settings/_components/layout/sidebar/index.tsx @@ -14,7 +14,7 @@ import { } from "lucide-react"; import { useSession } from "next-auth/react"; import Link from "next/link"; -import { usePathname } from "next/navigation"; +import { usePathname, useRouter } from "next/navigation"; import { FC, ForwardRefExoticComponent, RefAttributes } from "react"; import { useOrgContext } from "~/contexts/orgContext"; @@ -97,6 +97,7 @@ const SettingsSidebar: FC = ({ sideNavitems = sideItems }) => { const organizationPath = pathname?.split("/")[4]; const { organizations } = useOrgContext(); const { data: session } = useSession(); + const router = useRouter(); const organization = organizations.find( (org) => org.organisation_id === session?.currentOrgId, @@ -104,7 +105,7 @@ const SettingsSidebar: FC = ({ sideNavitems = sideItems }) => { return (
-
+
router.push("/dashboard")}>

Settings