diff --git a/app/[locale]/members/page.tsx b/app/[locale]/members/page.tsx index 8b418ca..bfce832 100644 --- a/app/[locale]/members/page.tsx +++ b/app/[locale]/members/page.tsx @@ -9,6 +9,7 @@ import { useTranslations } from 'next-intl'; import useTextDirection from '@/hooks/useTextDirection'; import Magnifier from '@/components/SvgCmps/Magnifier'; import classNames from 'classnames'; +import MemberCardLoader from '@/components/Members/MemberCard/memberCardLoader/MemberCardLoader'; const WelcomeMessage = () => { const t = useTranslations('Members'); @@ -79,7 +80,12 @@ const MembersPage: React.FC<{}> = ({}) => { /> - + + {members.length > 0 ? ( + + ) : ( + + )} ); }; diff --git a/components/Members/MemberCard/memberCardLoader/MemberCardInfoLoader.tsx b/components/Members/MemberCard/memberCardLoader/MemberCardInfoLoader.tsx new file mode 100644 index 0000000..05f9ac2 --- /dev/null +++ b/components/Members/MemberCard/memberCardLoader/MemberCardInfoLoader.tsx @@ -0,0 +1,30 @@ +import React from 'react'; + +function MemberCardInfoLoader() { + return ( +
+
+
+
+
+
+
+
+
+
+
+
+ {' '} +
+
+
+
+
+
+
+
+
+ ); +} + +export default MemberCardInfoLoader; diff --git a/components/Members/MemberCard/memberCardLoader/MemberCardLoader.tsx b/components/Members/MemberCard/memberCardLoader/MemberCardLoader.tsx new file mode 100644 index 0000000..7f5411c --- /dev/null +++ b/components/Members/MemberCard/memberCardLoader/MemberCardLoader.tsx @@ -0,0 +1,21 @@ +import MemberCardInfoLoader from './MemberCardInfoLoader'; + +const MemberCardLoader = ({ memberCardNum }: { memberCardNum: number }) => { + const duplicateLogic = Array.from({ length: memberCardNum }, (_, index) => { + return ( +
+ +
+ ); + }); + return ( +
+ {duplicateLogic} +
+ ); +}; + +export default MemberCardLoader;