fix: ESLint react-hooks 최신 규칙 호환
All checks were successful
Client CI/CD / test (push) Successful in 12s
Client CI/CD / deploy (push) Successful in 38s

- useCallback → 일반 함수 + eslint-disable (초기 데이터 fetch)
- ToastProvider: useCallback 프로퍼티 할당 → useMemo 객체 패턴
- SSAFYCallbackPage: eslint-disable-line 추가

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-15 23:45:10 +09:00
parent 790e6e4c7f
commit 1a3be5f76b
5 changed files with 23 additions and 25 deletions

View File

@@ -1,4 +1,4 @@
import { useState, useEffect, useCallback } from 'react';
import { useState, useEffect } from 'react';
import { useNavigate } from 'react-router-dom';
import { useAuth } from '../context/useAuth';
import { getDownloadInfo } from '../api/download';
@@ -14,15 +14,16 @@ export default function DownloadSection() {
const { user } = useAuth();
const navigate = useNavigate();
const loadInfo = useCallback(() => {
const loadInfo = () => {
setReady(false);
setLoadError(false);
getDownloadInfo()
.then((data) => { setInfo(data); setReady(true); })
.catch(() => { setLoadError(true); setReady(true); });
}, []);
};
useEffect(() => { loadInfo(); }, [loadInfo]);
// eslint-disable-next-line react-hooks/set-state-in-effect -- initial data fetch on mount
useEffect(() => { loadInfo(); }, []);
const handlePlay = async () => {
if (!user) {