-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* pages made * page set up * events card imported * story structure set up * mock data * map function to map the props * import interface as type * reimported * interface created to accept event card props * name change * mock data passed into storybook * removed mocks from actual page * bg image * basic fetching done * basic implementation of events view * improve documentation * add documentation to helper methods * add documentation and enforce consistent naming * update docs * pages made * page set up * events card imported * story structure set up * mock data * map function to map the props * import interface as type * reimported * interface created to accept event card props * name change * mock data passed into storybook * removed mocks from actual page * bg image * basic fetching done * basic implementation of events view * improve documentation * add documentation to helper methods * add documentation and enforce consistent naming * update docs * change event creation to also update description * sort events properly * allow pagination * update styling * fix date display error * remove footer from loader * small fixes * add search param for easier sharing * fix query * change stale time * handle edge case of no events * add placeholder for image * add placehold as image domain --------- Co-authored-by: zlrkw11 <[email protected]>
- Loading branch information
1 parent
969768e
commit 30a5a47
Showing
21 changed files
with
956 additions
and
148 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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,26 @@ | ||
"use client" | ||
|
||
import { Footer } from "@/components/generic/Footer/Footer" | ||
import queryClient from "@/services/QueryClient" | ||
import { QueryClientProvider } from "@tanstack/react-query" | ||
import { ReactNode } from "react" | ||
|
||
type IBookingLayout = Readonly<{ children: ReactNode }> | ||
|
||
const EventsPageLayout = ({ children }: IBookingLayout) => { | ||
return ( | ||
<div | ||
className="bg-mountain-background-image relative z-10 flex min-h-screen | ||
w-full flex-col items-center gap-8 bg-cover bg-top bg-no-repeat" | ||
> | ||
<div className="bg-gray-1 pointer-events-none absolute -z-30 h-full w-full opacity-70" /> | ||
<QueryClientProvider client={queryClient}>{children}</QueryClientProvider> | ||
|
||
<span className="mt-auto w-full"> | ||
<Footer /> | ||
</span> | ||
</div> | ||
) | ||
} | ||
|
||
export default EventsPageLayout |
This file contains 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
This file contains 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
58 changes: 58 additions & 0 deletions
58
client/src/components/composite/EventsView/EventsView.story.tsx
This file contains 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,58 @@ | ||
import type { Meta, StoryObj } from "@storybook/react" | ||
import EventsPage from "./EventsView" | ||
import { Timestamp } from "firebase/firestore" | ||
|
||
const meta: Meta<typeof EventsPage> = { | ||
component: EventsPage | ||
} | ||
export default meta | ||
type Story = StoryObj<typeof meta> | ||
|
||
const earlierStartDate = Timestamp.fromDate(new Date(2023, 1, 1)) | ||
const startDate = Timestamp.fromDate(new Date(2024, 1, 1)) | ||
|
||
export const DefaultEventsPage: Story = { | ||
args: { | ||
rawEvents: [ | ||
{ | ||
id: "1", | ||
title: "UASC New event 1", | ||
location: "UASC", | ||
physical_start_date: earlierStartDate, | ||
sign_up_start_date: earlierStartDate, | ||
sign_up_end_date: earlierStartDate, | ||
google_forms_link: "https://google.com", | ||
description: | ||
"Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit adipisci repellat perferendis. Quia ipsum laborum est, veniam accusamus voluptas praesentium, odio perspiciatis blanditiis sequi dignissimos unde. Natus delectus nihil cum." | ||
}, | ||
{ | ||
id: "2", | ||
title: "UASC New event 2", | ||
location: "UASC", | ||
physical_start_date: earlierStartDate, | ||
sign_up_start_date: startDate, | ||
sign_up_end_date: earlierStartDate, | ||
description: | ||
"Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit adipisci repellat perferendis. Quia ipsum laborum est, veniam accusamus voluptas praesentium, odio perspiciatis blanditiis sequi dignissimos unde. Natus delectus nihil cum." | ||
}, | ||
{ | ||
id: "3", | ||
title: "UASC New Event 3", | ||
location: "UASC", | ||
physical_start_date: earlierStartDate, | ||
sign_up_start_date: startDate, | ||
sign_up_end_date: earlierStartDate, | ||
description: | ||
"Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit adipisci repellat perferendis. Quia ipsum laborum est, veniam accusamus voluptas praesentium, odio perspiciatis blanditiis sequi dignissimos unde. Natus delectus nihil cum." | ||
} | ||
] | ||
}, | ||
tags: ["autodocs"] | ||
} | ||
|
||
export const EmptyEventsPage: Story = { | ||
args: { | ||
rawEvents: [] | ||
}, | ||
tags: ["autodocs"] | ||
} |
Oops, something went wrong.