Improves UI stability of availability page. No CLS now. (#3347)
This commit is contained in:
1 parent
b1e4c23adc
commit
ebd4750f2d
11 files changed
+105
-96
No files matched your search
@@ -26,7 +26,6 @@ export type BookPageProps = inferSSRProps<typeof getServerSideProps>;
|
||||
export default function Book(props: BookPageProps) {
|
||||
const { t } = useLocale();
|
||||
const locationLabels = getLocationLabels(t);
|
||||
|
||||
return props.away ? (
|
||||
<div className="h-screen dark:bg-neutral-900">
|
||||
<main className="mx-auto max-w-3xl px-4 py-24">
|
||||
|
||||
@@ -15,6 +15,7 @@ class MyDocument extends Document<Props> {
|
||||
return (
|
||||
<Html lang={locale} dir={dir}>
|
||||
<Head>
|
||||
<link rel="preload" href="/cal.ttf" as="font" type="font/ttf" />
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
|
||||
|
||||
@@ -250,6 +250,7 @@ export const EventTypeList = ({ group, groupIndex, readOnly, types }: EventTypeL
|
||||
items={type.users.map((organizer) => ({
|
||||
alt: organizer.name || "",
|
||||
image: `${WEBAPP_URL}/${organizer.username}/avatar.png`,
|
||||
title: organizer.name || "",
|
||||
}))}
|
||||
/>
|
||||
)}
|
||||
|
||||
@@ -66,6 +66,7 @@ function TeamPage({ team }: TeamPageProps) {
|
||||
size={10}
|
||||
items={type.users.map((user) => ({
|
||||
alt: user.name || "",
|
||||
title: user.name || "",
|
||||
image: CAL_URL + "/" + user.username + "/avatar.png" || "",
|
||||
}))}
|
||||
/>
|
||||
|
||||
@@ -13,6 +13,8 @@ import { inferSSRProps } from "@lib/types/inferSSRProps";
|
||||
|
||||
import AvailabilityPage from "@components/booking/pages/AvailabilityPage";
|
||||
|
||||
import { ssgInit } from "@server/lib/ssg";
|
||||
|
||||
export type AvailabilityTeamPageProps = inferSSRProps<typeof getServerSideProps>;
|
||||
|
||||
export default function TeamType(props: AvailabilityTeamPageProps) {
|
||||
@@ -24,6 +26,7 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) =>
|
||||
const typeParam = asStringOrNull(context.query.type);
|
||||
const dateParam = asStringOrNull(context.query.date);
|
||||
const rescheduleUid = asStringOrNull(context.query.rescheduleUid);
|
||||
const ssg = await ssgInit(context);
|
||||
|
||||
if (!slugParam || !typeParam) {
|
||||
throw new Error(`File is not named [idOrSlug]/[user]`);
|
||||
@@ -145,6 +148,7 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) =>
|
||||
workingHours,
|
||||
previousPage: context.req.headers.referer ?? null,
|
||||
booking,
|
||||
trpcState: ssg.dehydrate(),
|
||||
},
|
||||
};
|
||||
};
|
||||
Reference in new issue
Block a user