11'use client' ;
22import { useState } from 'react' ;
3- import { useState } from 'react' ;
43import Alarm from '../../Alarm' ;
54import { getApi } from '@/app/api/config/appConfig' ;
65import TextButton from '@/shared/components/button/TextButton' ;
@@ -20,14 +19,6 @@ interface MyAlarm {
2019 postTitle : string ;
2120 read : boolean ;
2221 type : string ;
23- id : number ;
24- message : string ;
25- postCategoryName : string ;
26- postId : number ;
27- postThumbnailUrl : string | null ;
28- postTitle : string ;
29- read : boolean ;
30- type : string ;
3122}
3223
3324function MyAlarm ( ) {
@@ -54,7 +45,6 @@ function MyAlarm() {
5445 } ) ;
5546 } ;
5647 const items = data ?. items ?? [ ] ;
57- const items = data ?. items ?? [ ] ;
5848
5949 return (
6050 < section >
@@ -70,30 +60,6 @@ function MyAlarm() {
7060 < TextButton className = "my-5" onClick = { handleDelete } >
7161 전체삭제
7262 </ TextButton >
73- { isModal && (
74- < DeleteAllModal
75- open = { isModal }
76- onClose = { ( ) => setIsModal ( ! isModal ) }
77- setIsModal = { setIsModal }
78- type = "myAlarm"
79- />
80- ) }
81- < TextButton className = "my-5" onClick = { handleDelete } >
82- 전체삭제
83- </ TextButton >
84- </ div >
85- < div className = "flex flex-col gap-3" >
86- { items . length !== 0 ? (
87- items . map ( ( { id, postId, postTitle, read, message, createdAt } : MyAlarm ) => (
88- < Link href = { `/community/${ postId } ` } key = { id } onClick = { ( ) => handleRead ( id ) } >
89- < Alarm title = { postTitle } content = { message } createdAt = { createdAt } read = { read } />
90- </ Link >
91- ) )
92- ) : (
93- < div className = "flex justify-center" >
94- < p > 알림이 없습니다.</ p >
95- </ div >
96- ) }
9763 </ div >
9864 < div className = "flex flex-col gap-3" >
9965 { items . length !== 0 ? (
0 commit comments