Skip to content

Commit

Permalink
feat: ✨ read meeting name from db
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinWu098 committed May 21, 2024
1 parent 7da6ade commit 43fc7ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/routes/availability/[slug]/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ export const load: PageServerLoad = (async ({ locals, params }) => {
form: await superValidate(_loginSchema),
availability: user ? await getAvailability(user, params?.slug) : null,
meetingId: params?.slug as string | undefined,
meetingData: await getExistingMeeting(params?.slug),
defaultDates: (await getMeetingDates(params?.slug)) ?? [],
startTime: (await getExistingMeeting(params?.slug)).from_time,
endTime: (await getExistingMeeting(params?.slug)).to_time,
};
}) satisfies PageServerLoad;

Expand Down
6 changes: 3 additions & 3 deletions src/routes/availability/[slug]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
let form: HTMLFormElement;
onMount(async () => {
$startTime = data.startTime as HourMinuteString;
$endTime = data.endTime as HourMinuteString;
$startTime = data.meetingData.from_time as HourMinuteString;
$endTime = data.meetingData.to_time as HourMinuteString;
});
$: availabilityTimeBlocks.set(
Expand All @@ -73,7 +73,7 @@

<div class="flex-between px-2 pt-8 md:px-4 md:pt-10 lg:px-[60px]">
<h1 class="line-clamp-1 h-8 pr-2 font-montserrat text-xl font-medium md:h-fit md:text-3xl">
Sample Meeting Winter 2024
{data.meetingData.title}
</h1>

{#if $isEditingAvailability}
Expand Down

0 comments on commit 43fc7ec

Please sign in to comment.