From 3119c357498f06b93dfbf6f9949a998d3d1304fd Mon Sep 17 00:00:00 2001 From: Peer Richelsen Date: Tue, 3 Aug 2021 10:07:39 +0200 Subject: [PATCH] removed unused code --- components/Shell.tsx | 2 +- pages/auth/login.tsx | 2 +- pages/event-types/[type].tsx | 66 +++++++++++++++++------------------- 3 files changed, 34 insertions(+), 36 deletions(-) diff --git a/components/Shell.tsx b/components/Shell.tsx index bce52a41..eaa94502 100644 --- a/components/Shell.tsx +++ b/components/Shell.tsx @@ -210,7 +210,7 @@ function UserDropdown({ session, small, bottom }: { session: any; small?: boolea {session.user.name} - {session.user.username} + /{session.user.username} )} diff --git a/pages/auth/login.tsx b/pages/auth/login.tsx index bf83b392..f0a183cc 100644 --- a/pages/auth/login.tsx +++ b/pages/auth/login.tsx @@ -43,7 +43,7 @@ export default function Login({ csrfToken }) {
- Forgot? + Forgot?
diff --git a/pages/event-types/[type].tsx b/pages/event-types/[type].tsx index 2b07a3b1..4d6329fe 100644 --- a/pages/event-types/[type].tsx +++ b/pages/event-types/[type].tsx @@ -7,7 +7,7 @@ import Select, { OptionBase } from "react-select"; import prisma from "@lib/prisma"; import { LocationType } from "@lib/location"; import Shell from "@components/Shell"; -import { getSession, useSession } from "next-auth/client"; +import { getSession } from "next-auth/client"; import { Scheduler } from "@components/ui/Scheduler"; import { Disclosure } from "@headlessui/react"; @@ -30,7 +30,6 @@ import utc from "dayjs/plugin/utc"; import timezone from "dayjs/plugin/timezone"; import { Availability, EventType, User } from "@prisma/client"; import { validJson } from "@lib/jsonUtils"; -import Text from "@components/ui/Text"; import { RadioGroup } from "@headlessui/react"; import classnames from "classnames"; import throttle from "lodash.throttle"; @@ -96,13 +95,12 @@ const PERIOD_TYPES = [ ]; export default function EventTypePage({ - user, - eventType, - locationOptions, - availability, - }: Props): JSX.Element { + user, + eventType, + locationOptions, + availability, +}: Props): JSX.Element { const router = useRouter(); - const [session, loading] = useSession(); console.log(eventType); const inputOptions: OptionBase[] = [ @@ -391,18 +389,18 @@ export default function EventTypePage({ -
-
+
+
-
+
-
+
-
+
-
+
{typeof location !== "undefined" ? location.hostname : ""}/{user.username}/ @@ -440,13 +438,13 @@ export default function EventTypePage({
-
+
-
+
{locations.length === 0 && (
@@ -569,13 +567,13 @@ export default function EventTypePage({
-
+
-
+
-
+
-
+