Skip to content

Commit dbc2848

Browse files
Merge pull request #14 from CodeCompasss/club
Club
2 parents 2205f8e + 29d7fd1 commit dbc2848

12 files changed

Lines changed: 236 additions & 112 deletions

File tree

package-lock.json

Lines changed: 55 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"next": "^15.3.3",
1717
"next-pwa": "^5.6.0",
1818
"react": "^19.1.0",
19-
"react-dom": "^19.1.0"
19+
"react-dom": "^19.1.0",
20+
"react-router-dom": "^7.6.2"
2021
},
2122
"devDependencies": {
2223
"@fortawesome/fontawesome-svg-core": "^6.7.2",

public/club_image/ieee.jpg

30 KB
Loading

public/club_image/mulearn.png

5.18 KB
Loading

public/wave-line.svg

Lines changed: 1 addition & 0 deletions
Loading

src/app/club/[slug]/page.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { notFound } from 'next/navigation';
2+
import clubData from '@/components/club/ClubData';
3+
4+
5+
export default async function ClubDetailPage({ params }: { params: { slug: string } }) {
6+
const { slug } = await Promise.resolve(params); // simulate async destructuring
7+
8+
const club = clubData.find((c) => c.slug === slug);
9+
if (!club) notFound();
10+
return <h1>Club Details</h1>;
11+
}

src/app/club/page.tsx

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,5 @@
1-
//replace with club buttons and stuff accroding to design
2-
import { BusButtons } from "@/components/Bus/busButton";
3-
4-
const busData = [
5-
{ slug: 'bus-1', name: 'Bus 1' },
6-
{ slug: 'bus-2', name: 'Bus 2' },
7-
{ slug: 'bus-3', name: 'Bus 3' },
8-
{ slug: 'bus-4', name: 'Bus 4' },
9-
{ slug: 'bus-5', name: 'Bus 5' },
10-
{ slug: 'bus-6', name: 'Bus 6' },
11-
];
12-
13-
export default function BusPage() {
14-
return (
15-
<div>
16-
<BusButtons buses={busData} />
17-
</div>
18-
);
19-
}
1+
'use client';
2+
import ClubList from "@/components/club/ClubList";
3+
export default function ClubPage() {
4+
return <ClubList/>;
5+
}

src/app/club/slug/page.tsx

Lines changed: 0 additions & 90 deletions
This file was deleted.

src/components/club/ClubCard.tsx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// src/components/clubs/ClubCard.tsx
2+
import Link from 'next/link';
3+
4+
type Club = {
5+
name: string;
6+
slug: string;
7+
description: string;
8+
image: string;
9+
};
10+
11+
export default function ClubCard({ club }: { club: Club }) {
12+
return (
13+
<Link href={`/club/${club.slug}`}>
14+
<div className="bg-white rounded-3xl border-2 border-black hover:bg-gray-200 transition h-[300px] flex flex-col">
15+
<img src={club.image} alt={club.name} className="w-full h-40 object-cover rounded-t-3xl border-b border-bottom-width-2px;" />
16+
<div className="p-4 flex flex-col flex-grow">
17+
<h2 className="text-2xl text-black font-semibold">{club.name}</h2>
18+
<p className="text-sm text-gray-600 mb-1">subtitle</p>
19+
<p className="text-gray-600 text-sm mt-1 line-clamp-2">{club.description}</p>
20+
</div>
21+
</div>
22+
</Link>
23+
24+
);
25+
}

src/components/club/ClubData.ts

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
// components/club/ClubData.tsx
2+
//Static club Data
3+
4+
export type Club = {
5+
name: string;
6+
slug: string;
7+
description: string;
8+
image: string;
9+
socials: {
10+
instagram?: string;
11+
linkedin?: string;
12+
whatsapp?: string;
13+
};
14+
enrolled: boolean; // Added the enrolled field
15+
};
16+
17+
const clubData: Club[] = [
18+
{
19+
name: "IEEE",
20+
slug: "ieee",
21+
description: "IEEE is a professional club focused on advancing technology and innovation through workshops, seminars, and projects.Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
22+
image: "/club_image/ieee.jpg",
23+
socials: {
24+
instagram: "https://www.instagram.com/ieeelink?igsh=MXZzM25wbjB1dWxxcA==",
25+
linkedin: "https://linkedin.com/company/ieee",
26+
whatsapp: "https://wa.me/919876543210"
27+
},
28+
enrolled: true // Example: IEEE is enrolled
29+
},
30+
{
31+
name: "MuLearn",
32+
slug: "mulearn",
33+
description: "MuLearn focuses on peer learning, encouraging students to explore and grow through collaborative knowledge sharing.",
34+
image: "/club_image/mulearn.png",
35+
socials: {
36+
instagram: "https://instagram.com/mulearn",
37+
linkedin: "https://www.instagram.com/mulearn.official?utm_source=ig_web_button_share_sheet&igsh=MTVxY2I4YWgxMjQ3",
38+
whatsapp: "https://wa.me/919876543210"
39+
},
40+
enrolled: false // Example: MuLearn is not enrolled
41+
},
42+
{
43+
name: "Mulearn",
44+
slug: "uuu",
45+
description: " on peer learning, encouraging students to explore and grow through collaborative knowledge sharing.",
46+
image: "/club_image/mulearn.png",
47+
socials: {
48+
instagram: "https://instagram.com/mulearn",
49+
linkedin: "https://linkedin.com/company/mulearn",
50+
whatsapp: "https://wa.me/919876543210"
51+
},
52+
enrolled: true
53+
}
54+
];
55+
56+
export default clubData;

0 commit comments

Comments
 (0)