1+ // Copyright (c) Gridiron Survivor.
2+ // Licensed under the MIT License.
3+
4+ import { JSX } from 'react' ;
15import { GiftExchangeWithMemberCount } from '@/app/types/giftExchange' ;
26import { formatDate } from '@/lib/utils' ;
37import { ChevronRight , Users } from 'lucide-react' ;
48import Link from 'next/link' ;
9+ import Image from 'next/image' ;
510
611type GroupCardProps = {
712 giftExchange : GiftExchangeWithMemberCount ;
813} ;
914
10- export const GroupCardSkeleton = ( ) => {
15+ /**
16+ * GroupCardSkeleton component.
17+ * Displays a loading skeleton placeholder for a GroupCard.
18+ * @returns {JSX.Element } Loader skeleton element.
19+ */
20+ export const GroupCardSkeleton = ( ) : JSX . Element => {
1121 return (
1222 < div className = "h-28 flex items-center p-4 rounded-xl bg-groupCardGreen animate-pulse" >
1323 < div className = "h-16 w-16 lg:h-20 lg:w-20 rounded-xl bg-gray-600" />
@@ -26,14 +36,22 @@ export const GroupCardSkeleton = () => {
2636 ) ;
2737} ;
2838
29- const GroupCard = ( { giftExchange } : GroupCardProps ) => {
39+ /**
40+ * GroupCard component. Renders a styled card that displays
41+ * various information about a gift exchange group.
42+ * @param {GiftExchangeWithMemberCount } giftExchange - A unique gift exchange.
43+ * @returns {JSX.Element } A group card element.
44+ */
45+ const GroupCard = ( { giftExchange } : GroupCardProps ) : JSX . Element => {
3046 return (
3147 < Link href = { `/gift-exchanges/${ giftExchange . gift_exchange_id } ` } >
3248 < div className = "h-28 flex items-center p-4 rounded-xl bg-groupCardGreen" >
33- < img
49+ < Image
3450 className = "h-16 w-16 lg:h-20 lg:w-20 rounded-xl"
3551 src = { giftExchange . group_image }
36- alt = { `${ giftExchange . name } image` }
52+ height = { 80 }
53+ width = { 80 }
54+ alt = ""
3755 />
3856 < div className = "flex flex-col flex-grow justify-center h-full ml-4 gap-2" >
3957 < h2 className = "font-semibold text-white text-base lg:text-lg" >
0 commit comments