fix: tour sidebar icons, auth pages scroll (#1555)

* fix: tour sidebar icons, menu button word wrap

* chore: change theme on sign out

* fix: auth pages scroll y-padding
This commit is contained in:
Aaryan Khandelwal 2023-07-18 19:02:33 +05:30 committed by GitHub
parent 07c097c9ad
commit 5ae963c451
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 34 additions and 52 deletions

View file

@ -3,11 +3,13 @@ import { Fragment } from "react";
import { useRouter } from "next/router";
import Link from "next/link";
// next-themes
import { useTheme } from "next-themes";
// headless ui
import { Menu, Transition } from "@headlessui/react";
// hooks
import useUser from "hooks/use-user";
import useTheme from "hooks/use-theme";
import useThemeHook from "hooks/use-theme";
import useWorkspaces from "hooks/use-workspaces";
import useToast from "hooks/use-toast";
// services
@ -43,12 +45,13 @@ export const WorkspaceSidebarDropdown = () => {
const { workspaceSlug } = router.query;
// fetching user details
const { user, mutateUser } = useUser();
// fetching theme context
const { collapsed: sidebarCollapse } = useTheme();
const { collapsed: sidebarCollapse } = useThemeHook();
const { setTheme } = useTheme();
const { setToastAlert } = useToast();
// fetching workspaces
const { activeWorkspace, workspaces } = useWorkspaces();
const handleWorkspaceNavigation = (workspace: IWorkspace) => {
@ -75,6 +78,7 @@ export const WorkspaceSidebarDropdown = () => {
.then(() => {
mutateUser(undefined);
router.push("/");
setTheme("dark");
})
.catch(() =>
setToastAlert({