diff --git a/apps/web/src/modules/academe/CooperationCase.tsx b/apps/web/src/modules/academe/CooperationCase.tsx index 11babdc5..67636964 100644 --- a/apps/web/src/modules/academe/CooperationCase.tsx +++ b/apps/web/src/modules/academe/CooperationCase.tsx @@ -30,26 +30,30 @@ async function getData({ repo }) { const Timer = ({ time = 15, setActiveFun, + open, }: { time?: number; setActiveFun: () => void; + open: boolean; }) => { const [progress, setProgress] = useState(0); + useEffect(() => { const interval = setInterval(() => { - setProgress((prevProgress) => { - if (prevProgress >= 101) { - setActiveFun(); - return 0; - } else { - return prevProgress + 10 / time; - } - }); + !open && + setProgress((prevProgress) => { + if (prevProgress >= 101) { + setActiveFun(); + return 0; + } else { + return prevProgress + 10 / time; + } + }); }, 100); return () => { clearInterval(interval); }; - }, []); + }, [open]); return (
@@ -79,7 +83,7 @@ const CooperationCase = () => { {t('academe:nju_desc')} {t('academe:nju_title')} @@ -434,6 +438,7 @@ const CooperationCase = () => { index === caseList.length - 1 ? 0 : index + 1 ); }} + open={open} /> )}
diff --git a/apps/web/src/modules/academe/components/Banner/index.tsx b/apps/web/src/modules/academe/components/Banner/index.tsx index 14db8189..6485baef 100644 --- a/apps/web/src/modules/academe/components/Banner/index.tsx +++ b/apps/web/src/modules/academe/components/Banner/index.tsx @@ -1,5 +1,4 @@ import React from 'react'; -import { useRouter } from 'next/router'; import classnames from 'classnames'; import { useTranslation } from 'next-i18next'; import Coutact from '../../Coutact'; @@ -7,7 +6,6 @@ import style from './index.module.css'; const Banner = () => { const { t } = useTranslation(); - const router = useRouter(); return (
{ >
diff --git a/apps/web/src/modules/academe/index.tsx b/apps/web/src/modules/academe/index.tsx index 98746308..ebcfaf40 100644 --- a/apps/web/src/modules/academe/index.tsx +++ b/apps/web/src/modules/academe/index.tsx @@ -4,6 +4,7 @@ import Banner from '@modules/academe/components/Banner'; import CooperationCase from './CooperationCase'; import CooperationProcess from './CooperationProcess'; import SubmitApplication from './SubmitApplication'; +import Footer from '@common/components/Footer'; const Explore = () => { return ( @@ -17,6 +18,7 @@ const Explore = () => {
+