Implemented the Reading and Listening initial screens according to the new designs, creating new components as needed
This commit is contained in:
@@ -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} />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user