diff --git a/client/src/layouts/rootLayout/RootLayout.jsx b/client/src/layouts/rootLayout/RootLayout.jsx index 55193b6e..261a81c8 100644 --- a/client/src/layouts/rootLayout/RootLayout.jsx +++ b/client/src/layouts/rootLayout/RootLayout.jsx @@ -1,4 +1,4 @@ -import { Link, Outlet } from 'react-router-dom'; +import { Link, Outlet, useLocation } from 'react-router-dom'; import './rootLayout.css'; import { SignedIn, UserButton, ClerkProvider } from "@clerk/clerk-react"; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; @@ -13,6 +13,9 @@ if (!PUBLISHABLE_KEY) { const queryClient = new QueryClient(); const RootLayout = () => { + const location = useLocation(); + const isDashboardRoute = location.pathname.startsWith("/dashboard"); + return ( @@ -22,7 +25,7 @@ const RootLayout = () => { Gen AI Chatbot - + {isDashboardRoute && }