diff --git a/apps/web/pages/[user]/[type].tsx b/apps/web/pages/[user]/[type].tsx index 6f54f171..9662c8e4 100644 --- a/apps/web/pages/[user]/[type].tsx +++ b/apps/web/pages/[user]/[type].tsx @@ -20,7 +20,22 @@ export type AvailabilityPageProps = inferSSRProps; export default function Type(props: AvailabilityPageProps) { const { t } = useLocale(); - return props.isDynamicGroup && !props.profile.allowDynamicBooking ? ( + return props.away ? ( +
+
+
+
+
+

+ 😴{" " + t("user_away")} +

+

{t("user_away_description")}

+
+
+
+
+
+ ) : props.isDynamicGroup && !props.profile.allowDynamicBooking ? (
@@ -118,6 +133,7 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) => darkBrandColor: true, defaultScheduleId: true, allowDynamicBooking: true, + away: true, schedules: { select: { availability: true, @@ -301,6 +317,7 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) => return { props: { + away: user.away, isDynamicGroup, profile, plan: user.plan, diff --git a/apps/web/pages/[user]/book.tsx b/apps/web/pages/[user]/book.tsx index 804a3661..b68d0ba0 100644 --- a/apps/web/pages/[user]/book.tsx +++ b/apps/web/pages/[user]/book.tsx @@ -30,7 +30,22 @@ export type BookPageProps = inferSSRProps; export default function Book(props: BookPageProps) { const { t } = useLocale(); - return props.isDynamicGroupBooking && !props.profile.allowDynamicBooking ? ( + return props.away ? ( +
+
+
+
+
+

+ 😴{" " + t("user_away")} +

+

{t("user_away_description")}

+
+
+
+
+
+ ) : props.isDynamicGroupBooking && !props.profile.allowDynamicBooking ? (
@@ -71,6 +86,7 @@ export async function getServerSideProps(context: GetServerSidePropsContext) { brandColor: true, darkBrandColor: true, allowDynamicBooking: true, + away: true, }, }); @@ -190,6 +206,7 @@ export async function getServerSideProps(context: GetServerSidePropsContext) { return { props: { + away: user.away, locationLabels: getLocationLabels(t), profile, eventType: eventTypeObject,