diff --git a/frontend/src/components/Footer/index.jsx b/frontend/src/components/Footer/index.jsx index 0ee53593..a7ac4011 100644 --- a/frontend/src/components/Footer/index.jsx +++ b/frontend/src/components/Footer/index.jsx @@ -6,8 +6,8 @@ import logoUpdate from '../../assets/logoUpdate.svg'; const aboutUsData = [ { - name: 'Our Mission', - path: '/aboutus', + name: 'Resources', + path: '/resources', }, { name: 'Our Vision', @@ -52,71 +52,100 @@ const resourcesData = [ // removed according to new design ]; const Footer = () => ( - ); diff --git a/frontend/src/components/ScrollToTop/index.jsx b/frontend/src/components/ScrollToTop/index.jsx new file mode 100644 index 00000000..ade9f235 --- /dev/null +++ b/frontend/src/components/ScrollToTop/index.jsx @@ -0,0 +1,12 @@ +import {useEffect} from 'react' +import { useLocation } from 'react-router-dom'; + +export default function ScrollToTop() { + const { pathname } = useLocation(); + + useEffect(() => { + window.scrollTo(0, 0); + + }, [pathname]) + return null; +} \ No newline at end of file diff --git a/frontend/src/index.jsx b/frontend/src/index.jsx index 828bab07..f288dad5 100644 --- a/frontend/src/index.jsx +++ b/frontend/src/index.jsx @@ -43,6 +43,7 @@ import Privacy from './pages/Privacy'; // } from './pages/Dashboard/DashboardMain/UploadFile/Upload'; const router = createBrowserRouter([ + { path: '/', element: , @@ -181,7 +182,7 @@ const router = createBrowserRouter([ element: , }, { - path: '/*', + path: '*', element: , }, // { diff --git a/frontend/src/pages/Error404/index.jsx b/frontend/src/pages/Error404/index.jsx index 4ca9184b..980ffe33 100644 --- a/frontend/src/pages/Error404/index.jsx +++ b/frontend/src/pages/Error404/index.jsx @@ -20,10 +20,10 @@ export default function Error404 () { We could not find what you searched for. Try searching again

- Go Back + Go to Home