diff --git a/src/app/dashboard/diaries/page.tsx b/src/app/dashboard/diaries/page.tsx
index a63b75c..a7e0f7d 100644
--- a/src/app/dashboard/diaries/page.tsx
+++ b/src/app/dashboard/diaries/page.tsx
@@ -1,7 +1,64 @@
+'use client';
+
+import { useSuspenseQuery } from '@apollo/experimental-nextjs-app-support/ssr';
+import { gql } from '@apollo/client';
import Diaries from '@/src/components/diaries/Diaries';
+import {
+ Diary,
+ ReadDiariesQuery,
+ ReadDiariesQueryVariables,
+} from '@/src/@types/__graphqlTypes__/graphql';
+
+const DIARIES_QUERY = gql`
+ query ReadDiaries($take: Int!, $skip: Int!) {
+ readDiaries(take: $take, skip: $skip) {
+ code
+ success
+ message
+ data {
+ createdDate
+ updatedDate
+ deletedDate
+ version
+ id
+ userId
+ title
+ notes {
+ createdDate
+ updatedDate
+ deletedDate
+ version
+ id
+ diaryId
+ title
+ text
+ images {
+ url
+ title
+ }
+ }
+ }
+ count
+ }
+ }
+`;
const DiariesPage = () => {
- return
Error loading diaries: {error.message}
; + if (!data || !data.readDiaries || !data.readDiaries.data) + returnNo data available
; + const filteredData = data.readDiaries.data.filter( + (diary): diary is Diary => diary !== null + ); + + returnError loading diaries: {error.message}
; - if (!data || !data.readDiaries || !data.readDiaries.data) - returnNo data available
; +interface DiariesProps { + diariesData: Diary[]; +} +const Diaries: React.FC{note?.text}
- {note?.images.map((image) => ( - - ))} -