-
Notifications
You must be signed in to change notification settings - Fork 16
Feat/student activites #569
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: staged
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -9,6 +9,7 @@ import { BouncyArrowButton } from '~/components/buttons'; | |||||||
| import { GalleryCarousel } from '~/components/carousels'; | ||||||||
| 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'; | ||||||||
|
|
@@ -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
|
||||||||
| 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`} | ||||||||
|
||||||||
| href={`/${locale}/student-activities/societies`} | |
| href="#societies" |
Copilot
AI
Mar 3, 2026
There was a problem hiding this comment.
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
AI
Mar 3, 2026
There was a problem hiding this comment.
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).
| linkProps={{ href: `/${locale}/student-activities/clubs` }} | |
| linkProps={{ href: `/${locale}/student-activities/council` }} |
Copilot
AI
Mar 3, 2026
There was a problem hiding this comment.
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).
| target="_blank" | |
| target="_blank" | |
| rel="noopener noreferrer" |
Copilot
AI
Mar 3, 2026
There was a problem hiding this comment.
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
AI
Mar 3, 2026
There was a problem hiding this comment.
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.
| target="_blank" | |
| target="_blank" | |
| rel="noopener noreferrer" |
Copilot
AI
Mar 3, 2026
There was a problem hiding this comment.
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.
| {text.sections.nss.content} | |
| {text.sections.ncc.content} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GalleryCarouselis 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 reintroduceGalleryCarousel).