-
Notifications
You must be signed in to change notification settings - Fork 14
Feat/clubs (Draft PR | Working on it) #266
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
Open
Debatreya
wants to merge
8
commits into
nitkkr-dev:master
Choose a base branch
from
Debatreya:feat/clubs
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
15cd30e
fix club name
KambojRajan faf63a3
redesign: page design change
KambojRajan a0c614b
med
KambojRajan e03852c
fix: minor ui fix and scroll fix
KambojRajan 6a19848
fix(conflict): Conflict Resolved
Debatreya a05b3b4
fix: Merge conflict resolved
Aryawart-kathpal d187326
fix: fixed ui for single club page
Aryawart-kathpal 40304a9
Merge branch 'feat/clubs' of https://github.com/Debatreya/nitkkr into…
Aryawart-kathpal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
123 changes: 123 additions & 0 deletions
123
app/[locale]/@modals/(.)student-activities/clubs/[dispaly_name]/event/page.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,123 @@ | ||
| import Image from 'next/image'; | ||
|
|
||
| import { GalleryCarousel } from '~/components/carousels'; | ||
| import { Dialog } from '~/components/dialog'; | ||
|
|
||
| interface ClubEvent { | ||
| id: number; | ||
| title: string; | ||
| date: string; | ||
| image: [string]; | ||
| description: string; | ||
| } | ||
|
|
||
| export default function EventPage({ | ||
| searchParams, | ||
| }: { | ||
| params: { locale: string }; | ||
| searchParams: { club_event: string }; | ||
| }) { | ||
| const events = [ | ||
| { | ||
| id: 0, | ||
| title: 'Event 1', | ||
| date: '2021-10-10', | ||
| image: [ | ||
| 'https://upload.wikimedia.org/wikipedia/commons/thumb/b/b6/Image_created_with_a_mobile_phone.png/800px-Image_created_with_a_mobile_phone.png', | ||
| ], | ||
| description: 'This is the description of the event', | ||
| }, | ||
| { | ||
| id: 1, | ||
| title: 'Event 2', | ||
| date: '2021-10-10', | ||
| image: [ | ||
| 'https://upload.wikimedia.org/wikipedia/commons/thumb/b/b6/Image_created_with_a_mobile_phone.png/800px-Image_created_with_a_mobile_phone.png', | ||
| ], | ||
| description: 'This is the description of the event', | ||
| }, | ||
| { | ||
| id: 2, | ||
| title: 'Event 3', | ||
| date: '2021-10-10', | ||
| image: [ | ||
| 'https://upload.wikimedia.org/wikipedia/commons/thumb/b/b6/Image_created_with_a_mobile_phone.png/800px-Image_created_with_a_mobile_phone.png', | ||
| ], | ||
| description: 'This is the description of the event', | ||
| }, | ||
| { | ||
| id: 3, | ||
| title: 'Event 4', | ||
| date: '2021-10-10', | ||
| image: [ | ||
| 'https://upload.wikimedia.org/wikipedia/commons/thumb/b/b6/Image_created_with_a_mobile_phone.png/800px-Image_created_with_a_mobile_phone.png', | ||
| ], | ||
| description: 'This is the description of the event', | ||
| }, | ||
| { | ||
| id: 4, | ||
| title: 'Event 5', | ||
| date: '2021-10-10', | ||
| image: [ | ||
| 'https://upload.wikimedia.org/wikipedia/commons/thumb/b/b6/Image_created_with_a_mobile_phone.png/800px-Image_created_with_a_mobile_phone.png', | ||
| ], | ||
| description: 'This is the description of the event', | ||
| }, | ||
| ] as ClubEvent[]; | ||
|
|
||
| const id = parseInt(searchParams.club_event); | ||
| const clubEvent = events[id]; | ||
| const imageCount = clubEvent.image.length; | ||
|
|
||
| return ( | ||
| <Dialog className="container mx-auto flex flex-col items-start space-y-6 rounded-lg border border-primary-500 bg-background p-6 shadow-lg md:flex-row md:items-center md:space-x-6 md:space-y-0"> | ||
| <GalleryCarousel | ||
| className="hidden h-80 w-full max-w-sm items-center justify-center overflow-hidden rounded-lg md:flex md:max-w-md" | ||
| itemClassName="" | ||
| > | ||
| {[...Array<number>(imageCount)].map((_, index) => ( | ||
| <Image | ||
| alt={String(index)} | ||
| height={400} | ||
| key={index} | ||
| src={clubEvent.image[index]} | ||
| width={400} | ||
| className="h-full w-full rounded-lg object-cover" | ||
| /> | ||
| ))} | ||
| </GalleryCarousel> | ||
| <section className="flex-1"> | ||
| <h2 className="text-primary-800 mb-4 text-2xl font-bold"> | ||
| {clubEvent.title} | ||
| </h2> | ||
| <GalleryCarousel | ||
| className="flex h-80 w-full max-w-sm items-center justify-center overflow-hidden rounded-lg md:hidden md:max-w-md" | ||
| itemClassName="" | ||
| > | ||
| {[...Array<number>(imageCount)].map((_, index) => ( | ||
| <Image | ||
| alt={String(index)} | ||
| height={400} | ||
| key={index} | ||
| src={clubEvent.image[index]} | ||
| width={400} | ||
| className="h-full w-full rounded-lg object-cover" | ||
| /> | ||
| ))} | ||
| </GalleryCarousel> | ||
| <br className="md:hidden" /> | ||
| <p className="text-gray-700 text-base leading-relaxed"> | ||
| Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolore quis | ||
| optio adipisci, voluptates nobis eos nisi tempora eius assumenda | ||
| maxime et velit reiciendis reprehenderit libero aut rem, vero, dolorum | ||
| animi! Voluptatum assumenda rerum, non consequatur labore vitae | ||
| repudiandae maxime beatae in doloribus itaque, quaerat dolorem | ||
| nesciunt modi quas provident officia, necessitatibus ut amet qui | ||
| voluptatibus facere. Aut aliquid veritatis cum, nihil, minima | ||
| laudantium perferendis assumenda doloribus quam aspernatur nulla | ||
| porro! | ||
| </p> | ||
| </section> | ||
| </Dialog> | ||
| ); | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
app/[locale]/student-activities/clubs/[display_name]/event/page.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| import { redirect } from 'next/navigation'; | ||
|
|
||
| export default function Event({ | ||
| params: { locale, display_name }, | ||
| }: { | ||
| params: { locale: string; display_name: string }; | ||
| }) { | ||
| redirect(`/${locale}/student-activities/clubs/${display_name}`); | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 type declaration 'image: [string];' may unintentionally define a fixed-length tuple instead of an array. Consider using 'string[]' to properly represent an array of strings.