Skip to content

Commit c15f537

Browse files
committed
feat: CartContent 컴포넌트에서 로딩 및 에러 상태를 LoadingContainer와 ErrorContainer로 처리
1 parent 9da7e57 commit c15f537

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/pages/cart/CartContent/CartContent.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import { useCartItem } from '../hooks/useCartItem';
77
import { useNavigate } from 'react-router-dom';
88
import { ROUTES } from '@/shared/config/routes';
99
import { calculatePaymentAmount } from '@/shared/utils/orderPricing';
10+
import LoadingContainer from '@/shared/components/LoadingContainer/LoadingContainer';
11+
import ErrorContainer from '@/shared/components/ErrorContainer/ErrorContainer';
1012

1113
export default function CartContent() {
1214
const {
@@ -24,11 +26,11 @@ export default function CartContent() {
2426
const navigate = useNavigate();
2527

2628
if (isLoading && !cartItems?.length) {
27-
return <div>로딩중</div>;
29+
return <LoadingContainer />;
2830
}
2931

3032
if (errorMessage) {
31-
return <div>에러남</div>;
33+
return <ErrorContainer errorMessage={errorMessage} />;
3234
}
3335

3436
if (!cartItems?.length) {

0 commit comments

Comments
 (0)