Implemented the Reading and Listening initial screens according to the new designs, creating new components as needed

This commit is contained in:
Tiago Ribeiro
2023-06-15 14:43:29 +01:00
parent 65ebdd7dde
commit 2d46bad40f
13 changed files with 272 additions and 85 deletions

View File

@@ -5,7 +5,20 @@ import type {AppProps} from "next/app";
import "primereact/resources/themes/lara-light-indigo/theme.css";
import "primereact/resources/primereact.min.css";
import "primeicons/primeicons.css";
import {useRouter} from "next/router";
import {useEffect} from "react";
import useExamStore from "@/stores/examStore";
export default function App({Component, pageProps}: AppProps) {
const reset = useExamStore((state) => state.reset);
const router = useRouter();
useEffect(() => {
if (router.pathname !== "/exam") {
reset();
}
}, [router.pathname, reset]);
return <Component {...pageProps} />;
}