Skip to content

Commit

Permalink
[#105] Feat: 다이어리 페이지 데이터 연동
Browse files Browse the repository at this point in the history
  • Loading branch information
D5ng committed Jun 18, 2024
1 parent fa5390b commit a8063cd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion components/family/diary/empty/family-diary-empty.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default function FamilyDiaryContentsEmpty() {
<div className={styles['diary-card']}>
<p className={styles['diary-card__text']}>다이어리에 아직 작성 된 내용이 없어요!</p>
<div className={styles['diary-card__button']}>
<Hyperlink href="/" className="primary" round>
<Hyperlink href="/diary" className="primary" round>
<Image src="images/family/add-black-icon.svg" alt="" width="20" height="20" className={styles.icon} />
다이어리 작성하러 가기
</Hyperlink>
Expand Down
4 changes: 2 additions & 2 deletions components/family/diary/family-diary-contents.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { useFetchDiary } from '@/hooks/queries/family';
import FamilyDiaryItem from '@/components/family/diary/item/family-diary-item';
import FamilyDiaryContentsEmpty from '@/components/family/diary/empty/family-diary-empty';
import CalendarInstance from '@/utils/date/date.utils';
import { useDiaries } from '@/hooks/queries/diary/use-diary-query';

export default function FamilyDiaryContents() {
const date = CalendarInstance.getTodayData();
const diaryQuery = useFetchDiary(date);
const diaryQuery = useDiaries(date);

if (!diaryQuery.data!.length) return <FamilyDiaryContentsEmpty />;

Expand Down
4 changes: 2 additions & 2 deletions components/family/diary/family-diary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import FamilyDiaryLayout from './layout/family-diary-layout';

import FamilyDiaryContents from './family-diary-contents';
import Suspensive from '@/components/suspensive/suspensive';
import { useFetchDiary } from '@/hooks/queries/family';
import CalendarInstance from '@/utils/date/date.utils';
import { useDiaries } from '@/hooks/queries/diary/use-diary-query';

export default function FamilyDiary() {
const date = CalendarInstance.getTodayData();
const diaryQuery = useFetchDiary(date);
const diaryQuery = useDiaries(date);

return (
<FamilyDiaryLayout>
Expand Down

0 comments on commit a8063cd

Please sign in to comment.