fix: home page redirection logic (#752)

* fix: dashboard workspace activity mutation

* fix: home page redirection logic

* chore: add homePageRedirect function back
This commit is contained in:
Aaryan Khandelwal 2023-04-09 00:02:33 +05:30 committed by GitHub
parent 03e74415f2
commit 08e77cb19e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 72 additions and 14 deletions

View file

@ -22,6 +22,8 @@ import { CubeIcon, PlusIcon } from "@heroicons/react/24/outline";
// types
import type { NextPage } from "next";
import type { IWorkspaceMemberInvitation } from "types";
// fetch-keys
import { USER_WORKSPACE_INVITATIONS } from "constants/fetch-keys";
const OnBoard: NextPage = () => {
const [invitationsRespond, setInvitationsRespond] = useState<string[]>([]);
@ -32,9 +34,8 @@ const OnBoard: NextPage = () => {
const { setToastAlert } = useToast();
const { data: invitations, mutate: mutateInvitations } = useSWR(
"USER_WORKSPACE_INVITATIONS",
() => workspaceService.userWorkspaceInvitations()
const { data: invitations, mutate: mutateInvitations } = useSWR(USER_WORKSPACE_INVITATIONS, () =>
workspaceService.userWorkspaceInvitations()
);
const { data: workspaces, mutate: mutateWorkspaces } = useSWR("USER_WORKSPACES", () =>