33import  {  FC  }  from  "react" ; 
44import  Link  from  "next/link" ; 
55import  Container  from  "@/components/Container" ; 
6+ import  {  VersionDifferent  }  from  "@/enum" ; 
67import  {  useSuspenseQuery  }  from  "@tanstack/react-query" ; 
78import  {  historyQuery  }  from  "@/services/history/history.query" ; 
89import  *  as  styles  from  "./style.css" ; 
@@ -21,33 +22,33 @@ const HistoryDetail: FC<{ id: number; title: string }> = ({ id, title }) => {
2122      docsType = { history . docsType } 
2223      lastModifiedAt = { history . versionDocs . thisVersionCreatedAt } 
2324    > 
24-       < div  className = { styles . container } > 
25+       < main  className = { styles . container } > 
2526        < Link  href = { `/user/${ history . versionDocs . userId }  }  className = { styles . author } > 
2627          작성자 · { history . versionDocs . nickName } 
2728        </ Link > 
28-         < div  className = { styles . historyBox } > 
29+         < ul  className = { styles . historyBox } > 
2930          { history . diff . map ( ( dif : HistoryType ,  historyId : number )  =>  { 
3031            const  operationIcon  =  ( ( )  =>  { 
3132              switch  ( dif . operation )  { 
32-                 case  " INSERT" 
33+                 case  VersionDifferent . INSERT :
3334                  return  "+" ; 
34-                 case  " DELETE" 
35+                 case  VersionDifferent . DELETE :
3536                  return  "-" ; 
36-                 case  " EQUAL" 
37-                   return   "" ; 
37+                 case  VersionDifferent . EQUAL :
38+                   return ; 
3839                default :
3940                  return  dif . operation ; 
4041              } 
4142            } ) ( ) ; 
4243            return  ( 
43-               < div  key = { historyId }  className = { styles . historyContent } > 
44-                 < div  className = { styles . historyOperation [ dif . operation ] } > { operationIcon } </ div > 
45-                 < div  className = { styles . history [ dif . operation ] } > { dif . text } </ div > 
46-               </ div > 
44+               < li  key = { historyId }  className = { styles . historyContent } > 
45+                 < i  className = { styles . historyOperation [ dif . operation ] } > { operationIcon } </ i > 
46+                 < p  className = { styles . history [ dif . operation ] } > { dif . text } </ p > 
47+               </ li > 
4748            ) ; 
4849          } ) } 
49-         </ div > 
50-       </ div > 
50+         </ ul > 
51+       </ main > 
5152    </ Container > 
5253  ) ; 
5354} ; 
0 commit comments