We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2114029 commit 0342b95Copy full SHA for 0342b95
src/app/quiz/finish/page.tsx
@@ -17,10 +17,14 @@ const QuizFinishPage: React.FC = () => {
17
18
const { data, isLoading: isQuizLoading, isError } = useQuizScore();
19
const [isLoading, setIsLoading] = useState(true);
20
-
21
- // 세션 스토리지에서 값 제거
22
- sessionStorage.removeItem('insta');
23
- sessionStorage.removeItem('email');
+
+ useEffect(() => {
+ // 클라이언트 측에서만 sessionStorage를 사용하도록 설정
+ if (typeof window !== 'undefined') {
24
+ sessionStorage.removeItem('insta');
25
+ sessionStorage.removeItem('email');
26
+ }
27
+ }, []);
28
29
const scoreData: ScoreData | null = data
30
? {
0 commit comments