From 81bcd021df6c0808a02e78c17b24b119b0ca80be Mon Sep 17 00:00:00 2001 From: Alex van Andel Date: Mon, 2 Aug 2021 22:11:36 +0000 Subject: [PATCH] Improved 'Create your first event type' layouting --- pages/event-types/index.tsx | 43 ++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/pages/event-types/index.tsx b/pages/event-types/index.tsx index 00cf1d89a5..93b4e83c04 100644 --- a/pages/event-types/index.tsx +++ b/pages/event-types/index.tsx @@ -20,7 +20,7 @@ import { PlusIcon, UserIcon, } from "@heroicons/react/solid"; -import Loader from '@components/Loader'; +import Loader from "@components/Loader"; export default function Availability({ user, types }) { const [session, loading] = useSession(); @@ -42,7 +42,7 @@ export default function Availability({ user, types }) { // TODO: Add validation - const response = await fetch("/api/availability/eventtype", { + await fetch("/api/availability/eventtype", { method: "POST", body: JSON.stringify({ title: enteredTitle, @@ -66,7 +66,7 @@ export default function Availability({ user, types }) { } if (loading) { - return ; + return ; } return ( @@ -79,12 +79,14 @@ export default function Availability({ user, types }) { heading="Event Types" subtitle="Create events to share for people to book on your calendar." CTA={ - + types.length !== 0 && ( + + ) }>
    @@ -261,9 +263,9 @@ export default function Availability({ user, types }) {
{types.length === 0 && ( -
+
@@ -500,12 +502,19 @@ export default function Availability({ user, types }) { - -

Create your first event type

-

- Event types enable you to share links that show available times on your calendar and allow - people to make bookings with you. -

+
+

Create your first event type

+

+ Event types enable you to share links that show available times on your calendar and allow + people to make bookings with you. +

+ +
)} {showAddModal && (