diff --git a/app/(main)/quiz/layout.tsx b/app/(main)/quiz/layout.tsx index 36f4bcd..78f961f 100644 --- a/app/(main)/quiz/layout.tsx +++ b/app/(main)/quiz/layout.tsx @@ -1,45 +1,13 @@ -'use client'; import ScrollToTop from '@/components/global/ScrollToTop'; import useScrollToTop from '@/lib/hooks/useScrollToTop'; import { cn } from '@/lib/utils'; import { ChevronUp } from 'lucide-react'; -import React, { PropsWithChildren, useEffect, useState } from 'react'; +import React, { PropsWithChildren } from 'react'; const layout = ({ children }: PropsWithChildren) => { - const [clicked, setClicked] = useState(0); - - useEffect(() => { - window.scrollTo(0, 0); - console.log('first'); - }, [clicked]); - - const [scrollY, setScrollY] = useState(false); - - const handleScroll = () => { - setScrollY(window.scrollY > 500 ? true : false); - }; - - useEffect(() => { - window.addEventListener('scroll', handleScroll); - - return () => { - window.removeEventListener('scroll', handleScroll); - }; - }, []); - return ( -