-
-
-
+ return (
+
+
+
+ );
+}
diff --git a/components/Settings.tsx b/components/Settings.tsx
index 1969c1ff..d175a563 100644
--- a/components/Settings.tsx
+++ b/components/Settings.tsx
@@ -1,87 +1,70 @@
-import ActiveLink from '../components/ActiveLink';
-import {CodeIcon, CreditCardIcon, KeyIcon, UserCircleIcon, UserGroupIcon} from '@heroicons/react/outline';
+import Link from "next/link";
+import { CodeIcon, CreditCardIcon, KeyIcon, UserGroupIcon, UserIcon } from "@heroicons/react/solid";
+import { useRouter } from "next/router";
+
+function classNames(...classes) {
+ return classes.filter(Boolean).join(" ");
+}
export default function SettingsShell(props) {
- return (
-
-
-
-
-
-
-
- {props.children}
-
-
-
-
-
- );
+ return (
+
+ );
}
diff --git a/components/Shell.tsx b/components/Shell.tsx
index beafc8ed..914f1fc6 100644
--- a/components/Shell.tsx
+++ b/components/Shell.tsx
@@ -1,277 +1,332 @@
import Link from "next/link";
-import { useEffect, useState } from "react";
+import React, { Fragment, useEffect } from "react";
import { useRouter } from "next/router";
-import { signOut, useSession } from "next-auth/client";
-import { MenuIcon, XIcon } from "@heroicons/react/outline";
+import { useSession } from "next-auth/client";
+import { Menu, Transition } from "@headlessui/react";
import { collectPageParameters, telemetryEventTypes, useTelemetry } from "../lib/telemetry";
+import { SelectorIcon } from "@heroicons/react/outline";
+import {
+ CalendarIcon,
+ ChatAltIcon,
+ ClockIcon,
+ CogIcon,
+ ExternalLinkIcon,
+ LinkIcon,
+ LogoutIcon,
+ PuzzleIcon,
+} from "@heroicons/react/solid";
+import Logo from "./Logo";
+
+function classNames(...classes) {
+ return classes.filter(Boolean).join(" ");
+}
export default function Shell(props) {
const router = useRouter();
const [session, loading] = useSession();
- const [profileDropdownExpanded, setProfileDropdownExpanded] = useState(false);
- const [mobileMenuExpanded, setMobileMenuExpanded] = useState(false);
const telemetry = useTelemetry();
+ const navigation = [
+ {
+ name: "Event Types",
+ href: "/event-types",
+ icon: LinkIcon,
+ current: router.pathname.startsWith("/event-types"),
+ },
+ {
+ name: "Bookings",
+ href: "/bookings",
+ icon: ClockIcon,
+ current: router.pathname.startsWith("/bookings"),
+ },
+ {
+ name: "Availability",
+ href: "/availability",
+ icon: CalendarIcon,
+ current: router.pathname.startsWith("/availability"),
+ },
+ {
+ name: "Integrations",
+ href: "/integrations",
+ icon: PuzzleIcon,
+ current: router.pathname.startsWith("/integrations"),
+ },
+ {
+ name: "Settings",
+ href: "/settings/profile",
+ icon: CogIcon,
+ current: router.pathname.startsWith("/settings"),
+ },
+ ];
+
useEffect(() => {
telemetry.withJitsu((jitsu) => {
return jitsu.track(telemetryEventTypes.pageView, collectPageParameters(router.pathname));
});
}, [telemetry]);
- const toggleProfileDropdown = () => {
- setProfileDropdownExpanded(!profileDropdownExpanded);
- };
-
- const toggleMobileMenu = () => {
- setMobileMenuExpanded(!mobileMenuExpanded);
- };
-
- const logoutHandler = () => {
- signOut({ redirect: false }).then(() => router.push("/auth/logout"));
- };
-
if (!loading && !session) {
router.replace("/auth/login");
}
return session ? (
-
-
-