From 90bb251c45b23bc68634881cd25754c73b5ad288 Mon Sep 17 00:00:00 2001 From: Ethen1264 Date: Tue, 3 Dec 2024 09:11:21 +0900 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8Chore:=20simple=20function?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widgets/expo-manage/ui/ExpoManageForm/index.tsx | 6 ++++++ src/widgets/program-detail/ui/ProgramDetailForm/index.tsx | 5 ++++- src/widgets/program/ui/ProgramForm/index.tsx | 6 ++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/widgets/expo-manage/ui/ExpoManageForm/index.tsx b/src/widgets/expo-manage/ui/ExpoManageForm/index.tsx index 9c421a3..2708527 100644 --- a/src/widgets/expo-manage/ui/ExpoManageForm/index.tsx +++ b/src/widgets/expo-manage/ui/ExpoManageForm/index.tsx @@ -49,6 +49,7 @@ const ExpoManageForm = ({ id }: { id: string }) => { const [requestPrintCategories, setRequestPrintCategories] = useState< string[] >(traineeRequestPrintCategories); + const [resetKey, setResetKey] = useState(0); useEffect(() => { const fetchExpoData = async () => { @@ -80,6 +81,10 @@ const ExpoManageForm = ({ id }: { id: string }) => { } }, [selectOption]); + useEffect(() => { + setResetKey((prevKey) => prevKey + 1); + }, [selectOption]); + return (
{ onChange={(value) => setSelectOption(value)} /> { const searchParams = useSearchParams(); - const navigation = searchParams.get('navigation') || 'standard'; // URL 쿼리 파라미터에서 navigation 값 가져오기 + const navigation = searchParams.get('navigation') || 'standard'; const [data, setData] = useState([]); useEffect(() => { @@ -56,6 +57,7 @@ const ProgramDetailForm = ({ id }: { id: number }) => { '성명', '소속', '직급', + '프로그램 이름', '출석 여부', '입실 시간', '퇴실 시간', @@ -70,6 +72,7 @@ const ProgramDetailForm = ({ id }: { id: number }) => { maxHeight="414px" footerType="file" text="인원 수" + actions={fileActions(id)} />
); diff --git a/src/widgets/program/ui/ProgramForm/index.tsx b/src/widgets/program/ui/ProgramForm/index.tsx index 6375cd9..00d6e84 100644 --- a/src/widgets/program/ui/ProgramForm/index.tsx +++ b/src/widgets/program/ui/ProgramForm/index.tsx @@ -19,6 +19,7 @@ const ProgramForm = ({ id }: { id: string }) => { const searchParams = useSearchParams(); const navigation = searchParams.get('navigation') || 'standard'; const [expoData, setExpoData] = useState([]); + const [resetKey, setResetKey] = useState(0); const router = useRouter(); const requestPrintCategories = useMemo(() => { @@ -45,10 +46,15 @@ const ProgramForm = ({ id }: { id: string }) => { fetchExpoData(); }, [id, navigation]); + useEffect(() => { + setResetKey((prevKey) => prevKey + 1); + }, [navigation]); + return (