Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
212 changes: 194 additions & 18 deletions app/[locale]/student-activities/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { BouncyArrowButton } from '~/components/buttons';
import { GalleryCarousel } from '~/components/carousels';
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GalleryCarousel is imported but no longer used after switching the carousel markup to a plain <div> grid. This will trip lint/typecheck; remove the unused import (or reintroduce GalleryCarousel).

Suggested change
import { GalleryCarousel } from '~/components/carousels';

Copilot uses AI. Check for mistakes.
import Heading from '~/components/heading';
import ImageHeader from '~/components/image-header';
import StudentGroup from '~/components/student-group';
import Loading from '~/components/loading';
import { Card, CardDescription, CardTitle } from '~/components/ui';
import { getTranslations } from '~/i18n/translations';
Expand All @@ -21,37 +22,82 @@ export default async function StudentActivities({
params: { locale: string };
}) {
const text = (await getTranslations(locale)).StudentActivities;

const studentCoordinators = [
{ rollNumber: '12212070' },
{ rollNumber: '12112002'},
{ rollNumber: '12112003'},
{ rollNumber: '12112004'},
];
return (
<>
<ImageHeader
title={text.title}
headings={[
{ label: text.headings.clubs, href: 'student-activities/clubs' },
{ label: text.headings.council, href: '#council' },
{ label: text.headings.events, href: 'student-activities/events' },
{
label: text.headings.thoughtLab,
href: 'student-activities/thought-lab',
},
{ label: text.headings.clubs, href: '#clubs' },
{ label: text.headings.societies, href: '#societies' },
{ label: text.headings.events, href: '#events' },
{ label: text.headings.council, href: '#council' },
{label: text.headings.thoughtLab, href: '#thought-lab',},
{ label: text.headings.nss, href: '#nss' },
{ label: text.headings.ncc, href: 'student-activities/ncc' },
{ label: text.headings.ncc, href: '#ncc' },


]}
Comment on lines +38 to 45
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file appears to be unformatted relative to the repo’s Prettier rules (e.g. inconsistent spacing in object literals, extra blank lines). Since CI runs npm run format:check, please run npm run format on this file to avoid formatting check failures.

Copilot uses AI. Check for mistakes.
src="student-activities/header.jpg"
/>

<section id="clubs">
<Heading
className="container"
glyphDirection="ltr"
glyphDirection="rtl"
heading="h3"
href="#clubs"
href={`/${locale}/student-activities/clubs`}
text={text.sections.clubs.title}
/>

<section className="container mb-6 text-center">
<Suspense fallback={<Loading />}>
<ClubsCarousel locale={locale} />
</Suspense>

</section>
</section>
<section id="societies">

<Heading
className="container"
glyphDirection="ltr"
heading="h3"
href={`/${locale}/student-activities/societies`}
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

href={/${locale}/student-activities/societies} points to a route that doesn’t exist in app/[locale]/student-activities/ (there’s no societies/ page), so this link will 404. Either add the missing route or change the link to an on-page anchor (e.g. #societies) / an existing page.

Suggested change
href={`/${locale}/student-activities/societies`}
href="#societies"

Copilot uses AI. Check for mistakes.
text={text.sections.societies.title}
/>

<section className="container mb-6 text-center">
<Suspense fallback={<Loading />}>
<ClubsCarousel locale={locale} />
</Suspense>
Comment on lines +74 to +77
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<ClubsCarousel /> is rendered in both the Clubs and Societies sections, and it performs a DB query each time. This duplicates the same query/render work in a single request; consider fetching the clubs list once in StudentActivities and passing it down (or memoizing) so the page only hits the DB once.

Copilot uses AI. Check for mistakes.
</section>
</section>

<section id="events">

<Heading
className="container"
glyphDirection="rtl"
heading="h3"
href={`/${locale}/student-activities/events`}
text={text.sections.events.title}
/>
</section>


<section className="container text-center" id="council">
<Heading
glyphDirection="ltr"
heading="h3"
href="#council"
text={text.sections.council.title}
/>
<StudentGroup studentData={studentCoordinators} />
<BouncyArrowButton
buttonProps={{
className: cn(
Expand All @@ -63,9 +109,138 @@ export default async function StudentActivities({
variant: 'outline',
}}
linkProps={{ href: `/${locale}/student-activities/clubs` }}
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The council CTA text is text.sections.council.more (“View All Members”), but the button link still points to /${locale}/student-activities/clubs. This will take users to the wrong destination; update linkProps.href to the council destination (or change the text back to the clubs CTA).

Suggested change
linkProps={{ href: `/${locale}/student-activities/clubs` }}
linkProps={{ href: `/${locale}/student-activities/council` }}

Copilot uses AI. Check for mistakes.
text={text.sections.clubs.more}
text={text.sections.council.more}
/>
</section>
<section id="thought-lab">

<Heading
glyphDirection="rtl"
heading="h3"
href={`/${locale}/student-activities/thought-lab`}
text={text.sections.thoughtLab.title}
/>



<div className="grid grid-cols-1 items-center gap-8 md:grid-cols-2">
{/* Left: Image with caption */}
<div className="relative overflow-hidden rounded-lg shadow-md">
{/* Adjust this image */}
<Image
src={`academics/2.jpg`}
alt="Revised IP Policy"
width={500}
height={200}
className="h-auto max-h-80 w-full object-cover"
/>
<div className="absolute bottom-0 left-0 right-0 h-2/3 bg-gradient-to-t from-[#000000] to-[#FAFAFA]/25"></div>

<Link
href={`/${locale}/student-activities/thought-lab`} className="absolute bottom-4 left-4 font-serif text-2xl font-semibold text-shade-light hover:underline"
target="_blank"
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This Link uses target="_blank" but doesn’t set rel="noopener noreferrer". Add the rel attribute to prevent reverse-tabnabbing (even for internal links).

Suggested change
target="_blank"
target="_blank"
rel="noopener noreferrer"

Copilot uses AI. Check for mistakes.
>
<span className="uppercase">

</span>{' '}
THOUGHT LABORATORY →
</Link>
</div>

{/* Right: Description */}
<p className="text-gray-800 text-justify leading-relaxed">
{text.sections.thoughtLab.content}
</p>
</div>
</section>

<section id="nss">

<Heading
glyphDirection="ltr"
heading="h3"
href={`/${locale}/student-activities/nss`}
text={text.sections.nss.title}
/>



<div className="grid grid-cols-1 items-center gap-8 md:grid-cols-2">

{/* Left: Description */}
<p className="text-gray-800 text-justify leading-relaxed">
{text.sections.nss.content}
</p>

{/* Right: Image with caption */}
<div className="relative overflow-hidden rounded-lg shadow-md">
<Image
src={`academics/2.jpg`}
alt="Revised IP Policy"
width={500}
height={200}
className="h-auto max-h-80 w-full object-cover"
/>

<div className="absolute bottom-0 left-0 right-0 h-2/3 bg-gradient-to-t from-[#000000] to-[#FAFAFA]/25"></div>

<Link
href={`/${locale}/student-activities/nss`}
className="absolute bottom-4 left-4 font-serif text-2xl font-semibold text-shade-light hover:underline"
target="_blank"
>
Comment on lines +187 to +191
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This Link opens a new tab (target="_blank") without rel="noopener noreferrer". Please add rel to avoid reverse-tabnabbing.

Copilot uses AI. Check for mistakes.
<span className="uppercase">

</span>{' '}
NATIONAL SERVICE SCHEME →
</Link>
</div>

</div>
</section>

<section id="ncc">

<Heading
glyphDirection="rtl"
heading="h3"
href={`/${locale}/student-activities/ncc`}
text={text.sections.ncc.title}
/>

<div className="grid grid-cols-1 items-center gap-8 md:grid-cols-2">
{/* Left: Image with caption */}
<div className="relative overflow-hidden rounded-lg shadow-md">
{/* Adjust this image */}
<Image
src={`academics/2.jpg`}
alt="Revised IP Policy"
width={500}
height={200}
className="h-auto max-h-80 w-full object-cover"
/>
<div className="absolute bottom-0 left-0 right-0 h-2/3 bg-gradient-to-t from-[#000000] to-[#FAFAFA]/25"></div>

<Link
href={`/${locale}/student-activities/ncc`}
className="absolute bottom-4 left-4 font-serif text-2xl font-semibold text-shade-light hover:underline"
target="_blank"
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This Link uses target="_blank" but is missing rel="noopener noreferrer". Add rel for security.

Suggested change
target="_blank"
target="_blank"
rel="noopener noreferrer"

Copilot uses AI. Check for mistakes.
>
<span className="uppercase">

</span>{' '}
NATIONAL CADET CORPS →
</Link>
</div>

{/* Right: Description */}
<p className="text-gray-800 text-justify leading-relaxed">
{text.sections.nss.content}
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the NCC section, the description is rendering text.sections.nss.content instead of text.sections.ncc.content, so NCC will show the NSS copy.

Suggested change
{text.sections.nss.content}
{text.sections.ncc.content}

Copilot uses AI. Check for mistakes.
</p>
</div>
</section>


</>
);
}
Expand All @@ -78,7 +253,7 @@ const ClubsCarousel = async ({ locale }: { locale: string }) => {
// console.log(clubs);

return (
<GalleryCarousel>
<div className="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-6">
{clubs.map(({ alias, name, urlName }, index) => (
<Link
className="drop-shadow hover:drop-shadow-xl"
Expand All @@ -105,13 +280,12 @@ const ClubsCarousel = async ({ locale }: { locale: string }) => {

<CardDescription
className="
mt-0.5
mt-0.5
flex grow
items-center justify-center
overflow-hidden rounded-xl
p-0
leading-none
"
leading-none "
>
<Image
alt={alias ?? name}
Expand All @@ -124,6 +298,8 @@ const ClubsCarousel = async ({ locale }: { locale: string }) => {
</Card>
</Link>
))}
</GalleryCarousel>
</div>


);
};
Loading