Skip to content

Commit edb0a2a

Browse files
Merge pull request #15 from diyarjoji29/club-details
Club details
2 parents 29d7fd1 + 2db7c59 commit edb0a2a

8 files changed

Lines changed: 260 additions & 166 deletions

File tree

package-lock.json

Lines changed: 43 additions & 52 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { notFound } from 'next/navigation';
2-
import clubData from '@/components/club/ClubData';
3-
2+
import clubData from 'src/components/club/ClubData';
3+
import ClubDetail from '@/components/club/ClubDetail';
44

55
export default async function ClubDetailPage({ params }: { params: { slug: string } }) {
66
const { slug } = await Promise.resolve(params); // simulate async destructuring
77

88
const club = clubData.find((c) => c.slug === slug);
99
if (!club) notFound();
10-
return <h1>Club Details</h1>;
10+
return <ClubDetail club={club} />;
1111
}

src/app/layout.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import BottomNavBar from "@/components/bottomNavbar";
2-
import TopNavBar from "@/components/topNavbar";
1+
import BottomNavBar from "../components/bottomNavbar";
32
import { Geist, Geist_Mono } from "next/font/google";
43
import "./globals.css";
54

@@ -24,7 +23,7 @@ export default function RootLayout({
2423
<body
2524
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
2625
>
27-
<TopNavBar userName="John Doe" semester={4} department="CSE" />
26+
2827

2928
{children}
3029

src/app/lost/add/page.tsx

Lines changed: 60 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
'use client';
33
import { useState } from "react";
44
import { useRouter } from "next/navigation";
5+
import WaveDesign from "../wave/wave_design";
6+
import { ArrowLeftIcon } from "lucide-react";
7+
import Link from "next/link";
58

69
export default function AddItemPage() {
710
const router = useRouter();
@@ -29,60 +32,68 @@ export default function AddItemPage() {
2932
);
3033

3134
// Redirect back to the LostFound page
32-
router.push("/lost-found");
35+
router.push("/lost");
3336
};
3437

3538
return (
36-
<div className="p-4 max-w-md mx-auto">
37-
<h1 className="text-3xl font-bold mb-6 text-center">Lost & Found</h1>
38-
<h1 className="text-2xl font-bold mb-2">Add Details</h1>
39-
<label className="block border-2 border-black rounded-lg p-6 text-center cursor-pointer hover:bg-gray-300 mb-4">
40-
<span className="text-sm font-medium underline">Upload image</span>
39+
<div className="p-4">
40+
<div className="md:flex">
41+
<div className="flex items-center justify-center border-[1px] border-black rounded-full w-[40px] h-[40px]">
42+
<Link href={`/lost`}><ArrowLeftIcon/></Link>
43+
</div>
44+
<h1 className="text-3xl font-bold text-center md:ml-[530px]">Lost & Found</h1>
45+
</div>
46+
<WaveDesign className=" h-[20px] ml-[53px] md:ml-[42%]"/>
47+
<h1 className="text-2xl font-bold mb-2 ml-[150px]">Add Details</h1>
48+
<div className="px-[20px] md:px-[150px]">
49+
<label className="block border-[1px] border-black h-[100px] md:h-[70px] rounded-lg p-6 text-center cursor-pointer bg-gray-300 mb-3">
50+
<span className="text-sm font-medium underline">Upload image</span>
51+
<input
52+
type="file"
53+
accept="image/*"
54+
className="hidden"
55+
/>
56+
</label>
57+
<h6 className="text-sm font-medium mb-1">Item Name</h6>
58+
<input
59+
type="text"
60+
placeholder="Item Name"
61+
className="w-full p-2 border-[1px] border-black/[0.5] hover:border-black rounded-lg mb-1"
62+
value={name}
63+
onChange={(e) => setName(e.target.value)}
64+
/>
65+
<h6 className="text-sm font-medium mb-1">Description</h6>
66+
<textarea
67+
placeholder="Description"
68+
className="w-full p-2 border-[1px] border-black/[0.5] hover:border-black rounded-lg mb-1"
69+
value={description}
70+
onChange={(e) => setDescription(e.target.value)}
71+
/>
72+
<h6 className="text-sm font-medium mb-1">Last Seen Place</h6>
73+
<input
74+
type="text"
75+
placeholder="Last Seen Place"
76+
className="w-full p-2 border-[1px] border-black/[0.5] hover:border-black rounded-lg mb-1"
77+
value={lastSeenPlace}
78+
onChange={(e) => setLastSeenPlace(e.target.value)}
79+
/>
80+
<h6 className="text-sm font-medium mb-1">Contact Info</h6>
4181
<input
42-
type="file"
43-
accept="image/*"
44-
className="hidden"
82+
type="text"
83+
placeholder="Mobile Number"
84+
className="w-full p-2 border-[1px] border-black/[0.5] hover:border-black rounded-lg mb-1"
85+
value={contactInfo}
86+
onChange={(e) => setContactInfo(e.target.value)}
4587
/>
46-
</label>
47-
<h6 className="text-sm font-medium mb-1">Item Name</h6>
48-
<input
49-
type="text"
50-
placeholder="Item Name"
51-
className="w-full p-2 border-2 border-black rounded-lg mb-4"
52-
value={name}
53-
onChange={(e) => setName(e.target.value)}
54-
/>
55-
<h6 className="text-sm font-medium mb-1">Description</h6>
56-
<textarea
57-
placeholder="Description"
58-
className="w-full p-2 border-2 border-black rounded-lg mb-4"
59-
value={description}
60-
onChange={(e) => setDescription(e.target.value)}
61-
/>
62-
<h6 className="text-sm font-medium mb-1">Last Seen Place</h6>
63-
<input
64-
type="text"
65-
placeholder="Last Seen Place"
66-
className="w-full p-2 border-2 border-black rounded-lg mb-4"
67-
value={lastSeenPlace}
68-
onChange={(e) => setLastSeenPlace(e.target.value)}
69-
/>
70-
<h6 className="text-sm font-medium mb-1">Contact Info</h6>
71-
<input
72-
type="text"
73-
placeholder="Mobile Number"
74-
className="w-full p-2 border-2 border-black rounded-lg mb-4"
75-
value={contactInfo}
76-
onChange={(e) => setContactInfo(e.target.value)}
77-
/>
78-
<div className="flex justify-center">
79-
<button
80-
className="w-[120px] border-2 border-black text-black py-2 rounded-lg hover:bg-blue-700"
81-
onClick={handleSave}
82-
>
83-
Confirm
84-
</button>
88+
<div className="flex justify-center">
89+
<button
90+
className="w-[150px] mt-[10px] h-[40px] border-[1px] border-black text-black py-2 rounded-lg bg-[var(--main)]"
91+
onClick={handleSave}
92+
>
93+
Confirm
94+
</button>
95+
</div>
8596
</div>
8697
</div>
8798
);
88-
}
99+
}

0 commit comments

Comments
 (0)