From 5434c855e06c28fffb4c076df4af685cbdab150c Mon Sep 17 00:00:00 2001 From: kangminguu <131148077+kangminguu@users.noreply.github.com> Date: Thu, 7 Nov 2024 12:20:25 +0900 Subject: [PATCH] =?UTF-8?q?fix=20:=20=EB=8D=B0=EC=9D=B4=ED=8A=B8=ED=94=BC?= =?UTF-8?q?=EC=BB=A4=20=EB=B6=88=EA=B0=80=EB=8A=A5=20=EB=82=A0=EC=A7=9C=20?= =?UTF-8?q?=EB=B9=84=ED=99=9C=EC=84=B1=EC=99=80=20=EC=99=84=EB=A3=8C=20(#2?= =?UTF-8?q?56)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widgets/write-diary/ui/WriteDiaryContainer.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/widgets/write-diary/ui/WriteDiaryContainer.tsx b/src/widgets/write-diary/ui/WriteDiaryContainer.tsx index 832f1f5..b99b414 100644 --- a/src/widgets/write-diary/ui/WriteDiaryContainer.tsx +++ b/src/widgets/write-diary/ui/WriteDiaryContainer.tsx @@ -16,6 +16,7 @@ import { DatePicker } from '@/widgets/date-picker'; import { DiaryVisibilityControls } from '@/widgets/diary-visibility-controls'; import { setDateFormat } from '@/widgets/date-picker/ui/setDateFormat'; import { useNavigate, useParams } from 'react-router-dom'; +import { useAuthStore } from '@/features/login/hooks/useAuthStore'; import { EditLabel } from '@/entities/label/ui/EditLabel'; export const WriteDiaryContainer: React.FC = ({ @@ -63,13 +64,14 @@ export const WriteDiaryContainer: React.FC = ({ return `${year}-${month}-${day}`; }; - const userEmail = 'perfectTest@naver.com'; // 샘플 계정 + const { email } = useAuthStore(); + const url = process.env.REACT_APP_API_URL; useEffect(() => { const fetchDisabledDates = async () => { try { const response = await fetch( - `https://td3axvf8x7.execute-api.ap-northeast-2.amazonaws.com/moodi/diary?limit=40&user_email=${userEmail}` + `${url}/diary?user_email=${email}` ); // @ API 호출 const data = await response.json(); const dates = data.diaries.map(