From a151dcfd0108d4108fd6a91290d3f94860693a9c Mon Sep 17 00:00:00 2001 From: Peer Richelsen Date: Tue, 3 Aug 2021 10:34:43 +0200 Subject: [PATCH] removed unused imports --- components/Shell.tsx | 3 +- pages/bookings/index.tsx | 135 +++++++++++++++++++-------------------- 2 files changed, 67 insertions(+), 71 deletions(-) diff --git a/components/Shell.tsx b/components/Shell.tsx index 3a20d701..063feaa8 100644 --- a/components/Shell.tsx +++ b/components/Shell.tsx @@ -16,8 +16,7 @@ import { LinkIcon, } from "@heroicons/react/solid"; import Logo from "./Logo"; - - +import classNames from "@lib/classNames"; export default function Shell(props) { const router = useRouter(); diff --git a/pages/bookings/index.tsx b/pages/bookings/index.tsx index 6612f7d3..f21bd5ac 100644 --- a/pages/bookings/index.tsx +++ b/pages/bookings/index.tsx @@ -4,10 +4,10 @@ import { getSession, useSession } from "next-auth/client"; import Shell from "../../components/Shell"; import { useRouter } from "next/router"; import dayjs from "dayjs"; -import {Fragment} from 'react'; -import {Menu, Transition} from '@headlessui/react'; -import {DotsHorizontalIcon, ExternalLinkIcon, LinkIcon} from '@heroicons/react/solid'; - +import { Fragment } from "react"; +import { Menu, Transition } from "@headlessui/react"; +import { DotsHorizontalIcon } from "@heroicons/react/solid"; +import classNames from "@lib/classNames"; export default function Bookings({ bookings }) { const [, loading] = useSession(); @@ -104,76 +104,73 @@ export default function Bookings({ bookings }) { <> + className="hidden text-xs sm:text-sm lg:inline-flex items-center px-4 py-2 border-transparent font-medium rounded-sm shadow-sm text-neutral-700 bg-white hover:bg-neutral-100 border border-neutral-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-black ml-2"> Cancel + className="hidden text-xs sm:text-sm lg:inline-flex items-center px-4 py-2 border-transparent font-medium rounded-sm shadow-sm text-neutral-700 bg-white hover:bg-neutral-100 border border-neutral-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-black ml-2"> Reschedule - - {({ open }) => ( - <> -
- - Open options - -
+ + {({ open }) => ( + <> +
+ + Open options + +
- - -
- - {({ active }) => ( - - - )} - - - {({ active }) => ( - - )} - -
-
-
- - )} -
+ + +
+ + {({ active }) => ( + + Cancel + + )} + + + {({ active }) => ( + + Reschedule + + )} + +
+
+
+ + )} +
)} {!booking.confirmed && booking.rejected && ( @@ -229,8 +226,8 @@ export async function getServerSideProps(context) { }, }); - const bookings = b.reverse().map(booking=>{ - return ({...booking, startTime:booking.startTime.toISOString(), endTime:booking.endTime.toISOString(),}) + const bookings = b.reverse().map((booking) => { + return { ...booking, startTime: booking.startTime.toISOString(), endTime: booking.endTime.toISOString() }; }); return { props: { bookings } };