Skip to content

Commit

Permalink
Prefetch dashboard (#109)
Browse files Browse the repository at this point in the history
* Prefetch

* useEffect

* Update index.tsx

Should resolve build failure

* Ran lint fix

---------

Co-authored-by: Jake <[email protected]>
  • Loading branch information
TyHil and Jake3231 authored Oct 11, 2023
1 parent 55313b0 commit a6abe8c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Card from '@mui/material/Card';
import type { NextPage } from 'next';
import Head from 'next/head';
import { useRouter } from 'next/router';
import React from 'react';
import React, { useEffect, useState } from 'react';

import { SplashPageSearchBar } from '../components/common/SplashPageSearchBar/splashPageSearchBar';
import { LogoIcon } from '../components/icons/LogoIcon/logoIcon';
Expand All @@ -27,6 +27,10 @@ const Home: NextPage = () => {
);
}

useEffect(() => {
router.prefetch('/dashboard');
}, [router]);

return (
<>
<Head>
Expand Down

0 comments on commit a6abe8c

Please sign in to comment.