diff --git a/src/containers/mydashboard/InvitedDashboardList/Skeleton.tsx b/src/containers/mydashboard/InvitedDashboardList/Skeleton.tsx new file mode 100644 index 00000000..e18bb8f6 --- /dev/null +++ b/src/containers/mydashboard/InvitedDashboardList/Skeleton.tsx @@ -0,0 +1,62 @@ +export default function Skeleton() { + return ( +
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ); +} diff --git a/src/containers/mydashboard/InvitedDashboardList/index.tsx b/src/containers/mydashboard/InvitedDashboardList/index.tsx index 8bad74cc..0f03367d 100644 --- a/src/containers/mydashboard/InvitedDashboardList/index.tsx +++ b/src/containers/mydashboard/InvitedDashboardList/index.tsx @@ -5,6 +5,7 @@ import { useState, useEffect, useCallback, useRef } from 'react'; import InvitationItemList from './ItemList'; import SearchBar from './SearchBar'; +import Skeleton from './Skeleton'; import useFetchData from '@/hooks/useFetchData'; import { getInvitationsList } from '@/services/getService'; @@ -101,48 +102,21 @@ export default function InvitedDashboardList() { if (error) { return ( -
+

초대받은 대시보드

데이터를 가져오는 중 오류가 발생했습니다.

{error.message}

-
+
); } return ( -
+

초대받은 대시보드

{isLoading ? ( -
-
-
-
-
-
- {[...Array(3)].map((_, i) => ( - <> -
-
- - ))} -
- -
- {[...Array(5)].map((_, i) => ( -
- {[...Array(3)].map((__, j) => ( - <> -
-
- - ))} -
- ))} -
-
-
+ ) : ( <> {invitations.length > 0 || isSearching ? (