diff --git a/apps/nowait-admin/src/pages/AdminOrders/AdminOrders.tsx b/apps/nowait-admin/src/pages/AdminOrders/AdminOrders.tsx index daee6188..085808b5 100644 --- a/apps/nowait-admin/src/pages/AdminOrders/AdminOrders.tsx +++ b/apps/nowait-admin/src/pages/AdminOrders/AdminOrders.tsx @@ -106,9 +106,13 @@ const AdminOrders = () => { -
-
테이블
-
입금 내역
+
+
+ 테이블 +
+
+ 입금 내역 +
{
-
-
+
+
테이블
-
-
메뉴
-
수량
+
+ 메뉴 +
+
+ 수량
-
{isLoading ? ( diff --git a/apps/nowait-admin/src/pages/AdminOrders/OrderCard.tsx b/apps/nowait-admin/src/pages/AdminOrders/OrderCard.tsx index b3dc88aa..8733a0a7 100644 --- a/apps/nowait-admin/src/pages/AdminOrders/OrderCard.tsx +++ b/apps/nowait-admin/src/pages/AdminOrders/OrderCard.tsx @@ -208,15 +208,12 @@ const PaymentDetail = ({ ); }; -import { useWindowWidth } from "../../hooks/useWindowWidth"; - interface CookCardProps { tableNumber: number; menuNamesAndQuantities?: MenuNamesAndQuantities; } const CookCard = ({ tableNumber, menuNamesAndQuantities }: CookCardProps) => { - const windowWidth = useWindowWidth(); const menuEntries = menuNamesAndQuantities ? Object.entries(menuNamesAndQuantities) : []; @@ -224,71 +221,29 @@ const CookCard = ({ tableNumber, menuNamesAndQuantities }: CookCardProps) => { return (
-
-
+
+
{tableNumber}
-
- -
- {menuEntries.map(([menuName, quantity], index) => { - // 화면 크기에 따른 글자 수 제한 - const getDisplayText = (text: string) => { - // xl: 전체 표시, lg: 12글자, md: 7글자, sm: 6글자, xs: 4글자 - if (windowWidth >= 1280) { - return text; // 전체 화면에서는 모든 글자 표시 - } else if (windowWidth >= 1024) { - return text.length > 12 ? `${text.slice(0, 12)}...` : text; - } else if (windowWidth >= 768) { - return text.length > 7 ? `${text.slice(0, 7)}...` : text; - } else if (windowWidth >= 640) { - return text.length > 6 ? `${text.slice(0, 6)}...` : text; - } else { - return text.length > 4 ? `${text.slice(0, 4)}...` : text; - } - }; - - const isLargeScreen = windowWidth >= 1280; - - return ( -
-
- {getDisplayText(menuName)} -
-
- {quantity} -
+
+ {menuEntries.map(([menuName, quantity], index) => ( +
+
{menuName}
+
{quantity}
- ); - })} + ))} +
-
-
- 조리 완료 -
+ 조리 완료
);