@@ -5,6 +5,8 @@ import { Direction, Menu, MenuItem } from "@/features/card/components/menu";
55import { Card as CardData } from "@/types/card" ;
66import { classnames } from "@/utils/classnames" ;
77import { useEffect , useRef } from "react" ;
8+ import CardSkeleton from "../card/card-skeleton" ;
9+ import ColumnTitleSkeleton from "./column-title-skeleton" ;
810import styles from "./column.module.css" ;
911import PlusSvg from "./plus-svg" ;
1012
@@ -60,42 +62,47 @@ export default function Column({
6062
6163 return (
6264 < section className = { styles . columnContainer } >
63- < div className = { styles . columnTitleWrapper } >
64- < div className = { styles . columnTitle } >
65- < h3
66- title = { columnTitle }
67- className = { classnames ( Typography . xlSemiBold , styles . columnName ) }
68- >
69- { columnTitle }
70- </ h3 >
71- < h3 className = { Typography . lgSemiBold } > { cards . length } </ h3 >
72- </ div >
73- < div className = { styles . buttonWrapper } >
74- < button
75- className = { styles . columnTitleButton }
76- onClick = { ( ) => onClick ?.( ColumnActionType . Create ) }
77- >
78- < PlusSvg className = { styles . icon } />
79- </ button >
80- < Menu
81- items = { [
82- MenuItem . edit ( ( ) => onClick ?.( ColumnActionType . Modify ) ) ,
83- MenuItem . delete ( ( ) => onClick ?.( ColumnActionType . Delete ) ) ,
84- ] }
85- direction = { Direction . Right }
86- >
87- < SettingSvg
88- className = { classnames (
89- styles . columnEditIcon ,
90- styles . columnTitleButton
91- ) }
92- />
93- </ Menu >
65+ { isLoadingCards && cards . length === 0 ? (
66+ < ColumnTitleSkeleton />
67+ ) : (
68+ < div className = { styles . columnTitleWrapper } >
69+ < div className = { styles . columnTitle } >
70+ < h3
71+ title = { columnTitle }
72+ className = { classnames ( Typography . xlSemiBold , styles . columnName ) }
73+ >
74+ { columnTitle }
75+ </ h3 >
76+ < h3 className = { Typography . lgSemiBold } > { cards . length } </ h3 >
77+ </ div >
78+ < div className = { styles . buttonWrapper } >
79+ < button
80+ className = { styles . columnTitleButton }
81+ onClick = { ( ) => onClick ?.( ColumnActionType . Create ) }
82+ >
83+ < PlusSvg className = { styles . icon } />
84+ </ button >
85+ < Menu
86+ items = { [
87+ MenuItem . edit ( ( ) => onClick ?.( ColumnActionType . Modify ) ) ,
88+ MenuItem . delete ( ( ) => onClick ?.( ColumnActionType . Delete ) ) ,
89+ ] }
90+ direction = { Direction . Right }
91+ >
92+ < SettingSvg
93+ className = { classnames (
94+ styles . columnEditIcon ,
95+ styles . columnTitleButton
96+ ) }
97+ />
98+ </ Menu >
99+ </ div >
94100 </ div >
95- </ div >
101+ ) }
102+
96103 < div className = { styles . cardsWrapper } >
97104 { isLoadingCards && cards . length === 0 ? (
98- < div > 카드 로딩중... </ div >
105+ < CardSkeleton / >
99106 ) : (
100107 < >
101108 { cards . map ( ( card ) => (
0 commit comments