Commit c55c1f98 authored by jaden's avatar jaden

fix: fix page animation

parent bb0b47bd
...@@ -13,6 +13,10 @@ import Script from 'next/script'; ...@@ -13,6 +13,10 @@ import Script from 'next/script';
function Home() { function Home() {
const { t } = useTranslation(); const { t } = useTranslation();
useEffect(() => { useEffect(() => {
if (window?.fireworks) {
document.querySelector('#fireworks')?.remove();
fireworks();
}
return () => { return () => {
document.querySelector('#fireworks')?.remove(); document.querySelector('#fireworks')?.remove();
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment