diff --git a/src/components/club/HorizontalClubCard.tsx b/src/components/club/HorizontalClubCard.tsx new file mode 100644 index 0000000..41bfe56 --- /dev/null +++ b/src/components/club/HorizontalClubCard.tsx @@ -0,0 +1,49 @@ +import React from 'react'; +import Image from 'next/image'; +import { type SelectClub as Club } from '@src/server/db/models'; +import { type Session } from 'next-auth'; +import JoinButton from './JoinButton'; +import Link from 'next/link'; + +interface HorizontalClubCardProps { + club: Club; + session: Session | null; +} + +const HorizontalClubCard: React.FC = ({ club, session }) => { + const desc = + club.description.length > 50 + ? club.description.slice(0, 150) + '...' + : club.description; + const name = club.name.length > 20 ? club.name.slice(0, 30) + '...' : club.name; + + return ( +
+
+ {club.name} +
+
+
+

{name}

+
+ + + Learn More + +
+
+

{desc}

+
+
+ ); +}; + +export default HorizontalClubCard; \ No newline at end of file