diff --git a/web/components/core/sidebar/links-list.tsx b/web/components/core/sidebar/links-list.tsx index 48a5e16b7..d59ba94f3 100644 --- a/web/components/core/sidebar/links-list.tsx +++ b/web/components/core/sidebar/links-list.tsx @@ -9,7 +9,6 @@ import { ILinkDetails, UserAuth } from "@plane/types"; // hooks import useToast from "hooks/use-toast"; import { observer } from "mobx-react"; -import { useMeasure } from "@nivo/core"; import { useMember } from "hooks/store"; type Props = { diff --git a/web/components/headers/cycle-issues.tsx b/web/components/headers/cycle-issues.tsx index 74306df4c..a0ac3c9aa 100644 --- a/web/components/headers/cycle-issues.tsx +++ b/web/components/headers/cycle-issues.tsx @@ -116,7 +116,7 @@ export const CycleIssuesHeader: React.FC = observer(() => { }) ); }, - [workspaceSlug, projectId, cycleId, updateFilters] + [workspaceSlug, projectId, cycleId, updateFilters, captureEvent, router.asPath] ); const handleFiltersUpdate = useCallback( @@ -149,7 +149,7 @@ export const CycleIssuesHeader: React.FC = observer(() => { }) ); }, - [workspaceSlug, projectId, cycleId, issueFilters, updateFilters] + [workspaceSlug, projectId, cycleId, issueFilters, updateFilters, captureIssuesFilterEvent, router.asPath] ); const handleDisplayFilters = useCallback( @@ -169,7 +169,7 @@ export const CycleIssuesHeader: React.FC = observer(() => { }) ); }, - [workspaceSlug, projectId, cycleId, updateFilters, issueFilters] + [workspaceSlug, projectId, cycleId, updateFilters, issueFilters, captureIssuesDisplayFilterEvent, router.asPath] ); const handleDisplayProperties = useCallback( @@ -187,7 +187,7 @@ export const CycleIssuesHeader: React.FC = observer(() => { }) ); }, - [workspaceSlug, projectId, cycleId, updateFilters, issueFilters] + [workspaceSlug, projectId, cycleId, updateFilters, issueFilters, captureIssuesDisplayFilterEvent, router.asPath] ); // derived values diff --git a/web/components/headers/global-issues.tsx b/web/components/headers/global-issues.tsx index 24101a71c..ec33df8e8 100644 --- a/web/components/headers/global-issues.tsx +++ b/web/components/headers/global-issues.tsx @@ -21,11 +21,9 @@ import { EUserWorkspaceRoles } from "constants/workspace"; import { DP_APPLIED, DP_REMOVED, - elementFromPath, FILTER_APPLIED, FILTER_REMOVED, FILTER_SEARCHED, - LAYOUT_CHANGED, LP_UPDATED, } from "constants/event-tracker"; @@ -56,7 +54,7 @@ export const GlobalIssuesHeader: React.FC = observer((props) => { const { workspace: { workspaceMemberIds }, } = useMember(); - const { captureIssuesFilterEvent, captureEvent, captureIssuesDisplayFilterEvent } = useEventTracker(); + const { captureIssuesFilterEvent, captureIssuesDisplayFilterEvent } = useEventTracker(); const issueFilters = globalViewId ? filters[globalViewId.toString()] : undefined; @@ -97,7 +95,7 @@ export const GlobalIssuesHeader: React.FC = observer((props) => { }); }); }, - [workspaceSlug, issueFilters, updateFilters, globalViewId] + [workspaceSlug, issueFilters, updateFilters, globalViewId, captureIssuesFilterEvent, router.asPath] ); const handleDisplayFilters = useCallback( @@ -122,7 +120,7 @@ export const GlobalIssuesHeader: React.FC = observer((props) => { }) ); }, - [workspaceSlug, updateFilters, globalViewId, issueFilters] + [workspaceSlug, updateFilters, globalViewId, issueFilters, captureIssuesDisplayFilterEvent, router.asPath] ); const handleDisplayProperties = useCallback( @@ -146,7 +144,7 @@ export const GlobalIssuesHeader: React.FC = observer((props) => { }) ); }, - [workspaceSlug, updateFilters, globalViewId, issueFilters] + [workspaceSlug, updateFilters, globalViewId, issueFilters, captureIssuesDisplayFilterEvent, router.asPath] ); const isAuthorizedUser = !!currentWorkspaceRole && currentWorkspaceRole >= EUserWorkspaceRoles.MEMBER; diff --git a/web/components/headers/module-issues.tsx b/web/components/headers/module-issues.tsx index d516f708e..c1846cdc2 100644 --- a/web/components/headers/module-issues.tsx +++ b/web/components/headers/module-issues.tsx @@ -21,7 +21,7 @@ import { ProjectAnalyticsModal } from "components/analytics"; import { SidebarHamburgerToggle } from "components/core/sidebar/sidebar-menu-hamburger-toggle"; import { BreadcrumbLink } from "components/common"; // ui -import { Breadcrumbs, Button, CustomMenu, DiceIcon, LayersIcon } from "@plane/ui"; +import { Breadcrumbs, Button, CustomMenu, DiceIcon } from "@plane/ui"; // icons import { ArrowRight, PanelRight, Plus } from "lucide-react"; // helpers @@ -119,7 +119,7 @@ export const ModuleIssuesHeader: React.FC = observer(() => { }) ); }, - [workspaceSlug, projectId, moduleId, updateFilters] + [workspaceSlug, projectId, moduleId, updateFilters, captureEvent, router.asPath] ); const handleFiltersUpdate = useCallback( @@ -152,7 +152,7 @@ export const ModuleIssuesHeader: React.FC = observer(() => { }); }); }, - [workspaceSlug, projectId, moduleId, issueFilters, updateFilters] + [workspaceSlug, projectId, moduleId, issueFilters, updateFilters, captureIssuesFilterEvent, router.asPath] ); const handleDisplayFilters = useCallback( @@ -172,7 +172,7 @@ export const ModuleIssuesHeader: React.FC = observer(() => { }) ); }, - [workspaceSlug, projectId, moduleId, updateFilters, issueFilters] + [workspaceSlug, projectId, moduleId, updateFilters, issueFilters, captureIssuesDisplayFilterEvent, router.asPath] ); const handleDisplayProperties = useCallback( @@ -190,7 +190,7 @@ export const ModuleIssuesHeader: React.FC = observer(() => { }) ); }, - [workspaceSlug, projectId, moduleId, updateFilters, issueFilters] + [workspaceSlug, projectId, moduleId, updateFilters, issueFilters, captureIssuesDisplayFilterEvent, router.asPath] ); // derived values diff --git a/web/components/headers/project-issues.tsx b/web/components/headers/project-issues.tsx index a54fe023a..98292d8c8 100644 --- a/web/components/headers/project-issues.tsx +++ b/web/components/headers/project-issues.tsx @@ -96,7 +96,7 @@ export const ProjectIssuesHeader: React.FC = observer(() => { }) ); }, - [workspaceSlug, projectId, issueFilters, updateFilters] + [workspaceSlug, projectId, issueFilters, updateFilters, captureIssuesFilterEvent, router.asPath] ); const handleLayoutChange = useCallback( @@ -110,7 +110,7 @@ export const ProjectIssuesHeader: React.FC = observer(() => { }) ); }, - [workspaceSlug, projectId, updateFilters] + [workspaceSlug, projectId, updateFilters, captureEvent, router.asPath] ); const handleDisplayFilters = useCallback( @@ -129,7 +129,7 @@ export const ProjectIssuesHeader: React.FC = observer(() => { }) ); }, - [workspaceSlug, projectId, updateFilters, issueFilters] + [workspaceSlug, projectId, updateFilters, issueFilters, captureIssuesDisplayFilterEvent, router.asPath] ); const handleDisplayProperties = useCallback( @@ -147,7 +147,7 @@ export const ProjectIssuesHeader: React.FC = observer(() => { }); }); }, - [workspaceSlug, projectId, updateFilters, issueFilters] + [workspaceSlug, projectId, updateFilters, issueFilters, captureIssuesDisplayFilterEvent, router.asPath] ); const deployUrl = process.env.NEXT_PUBLIC_DEPLOY_URL; diff --git a/web/components/headers/project-view-issues.tsx b/web/components/headers/project-view-issues.tsx index 0a9506b7a..802f805ce 100644 --- a/web/components/headers/project-view-issues.tsx +++ b/web/components/headers/project-view-issues.tsx @@ -81,7 +81,7 @@ export const ProjectViewIssuesHeader: React.FC = observer(() => { }) ); }, - [workspaceSlug, projectId, viewId, updateFilters] + [workspaceSlug, projectId, viewId, updateFilters, captureEvent, router.asPath] ); const handleFiltersUpdate = useCallback( @@ -114,7 +114,7 @@ export const ProjectViewIssuesHeader: React.FC = observer(() => { }); }); }, - [workspaceSlug, projectId, viewId, issueFilters, updateFilters] + [workspaceSlug, projectId, viewId, issueFilters, updateFilters, captureIssuesFilterEvent, router.asPath] ); const handleDisplayFilters = useCallback( @@ -133,7 +133,7 @@ export const ProjectViewIssuesHeader: React.FC = observer(() => { }) ); }, - [workspaceSlug, projectId, viewId, updateFilters, issueFilters] + [workspaceSlug, projectId, viewId, updateFilters, issueFilters, captureIssuesDisplayFilterEvent, router.asPath] ); const handleDisplayProperties = useCallback( @@ -151,7 +151,7 @@ export const ProjectViewIssuesHeader: React.FC = observer(() => { }) ); }, - [workspaceSlug, projectId, viewId, updateFilters, issueFilters] + [workspaceSlug, projectId, viewId, updateFilters, issueFilters, captureIssuesDisplayFilterEvent, router.asPath] ); const viewDetails = viewId ? getViewById(viewId.toString()) : null; diff --git a/web/components/issues/attachment/root.tsx b/web/components/issues/attachment/root.tsx index ffa17d337..2db4e9518 100644 --- a/web/components/issues/attachment/root.tsx +++ b/web/components/issues/attachment/root.tsx @@ -91,7 +91,7 @@ export const IssueAttachmentRoot: FC = (props) => { } }, }), - [workspaceSlug, projectId, issueId, createAttachment, removeAttachment, setToastAlert] + [workspaceSlug, projectId, issueId, createAttachment, removeAttachment, setToastAlert, captureIssueEvent] ); return ( diff --git a/web/components/issues/issue-detail/inbox/root.tsx b/web/components/issues/issue-detail/inbox/root.tsx index 45622c135..93845a41d 100644 --- a/web/components/issues/issue-detail/inbox/root.tsx +++ b/web/components/issues/issue-detail/inbox/root.tsx @@ -115,7 +115,7 @@ export const InboxIssueDetailRoot: FC = (props) => { } }, }), - [inboxId, fetchInboxIssueById, updateInboxIssue, removeInboxIssue, setToastAlert] + [inboxId, fetchInboxIssueById, updateInboxIssue, removeInboxIssue, setToastAlert, captureIssueEvent, router.asPath] ); useSWR( diff --git a/web/components/issues/issue-detail/root.tsx b/web/components/issues/issue-detail/root.tsx index 2592d978b..e0dcdac47 100644 --- a/web/components/issues/issue-detail/root.tsx +++ b/web/components/issues/issue-detail/root.tsx @@ -132,9 +132,8 @@ export const IssueDetailRoot: FC = observer((props) => { }, remove: async (workspaceSlug: string, projectId: string, issueId: string) => { try { - let response; - if (is_archived) response = await removeArchivedIssue(workspaceSlug, projectId, issueId); - else response = await removeIssue(workspaceSlug, projectId, issueId); + if (is_archived) await removeArchivedIssue(workspaceSlug, projectId, issueId); + else await removeIssue(workspaceSlug, projectId, issueId); setToastAlert({ title: "Issue deleted successfully", type: "success", @@ -328,6 +327,8 @@ export const IssueDetailRoot: FC = observer((props) => { removeIssueFromModule, removeModulesFromIssue, setToastAlert, + captureIssueEvent, + router.asPath, ] ); diff --git a/web/components/issues/issue-layouts/empty-states/cycle.tsx b/web/components/issues/issue-layouts/empty-states/cycle.tsx index 4b7676173..e7cfa9b02 100644 --- a/web/components/issues/issue-layouts/empty-states/cycle.tsx +++ b/web/components/issues/issue-layouts/empty-states/cycle.tsx @@ -3,7 +3,7 @@ import { observer } from "mobx-react-lite"; import { PlusIcon } from "lucide-react"; import { useTheme } from "next-themes"; // hooks -import { useApplication, useEventTracker, useIssueDetail, useIssues, useUser } from "hooks/store"; +import { useApplication, useEventTracker, useIssues, useUser } from "hooks/store"; import useToast from "hooks/use-toast"; // components import { ExistingIssuesListModal } from "components/core"; @@ -43,7 +43,6 @@ export const CycleEmptyState: React.FC = observer((props) => { const { resolvedTheme } = useTheme(); // store hooks const { issues } = useIssues(EIssuesStoreType.CYCLE); - const { updateIssue, fetchIssue } = useIssueDetail(); const { commandPalette: { toggleCreateIssueModal }, } = useApplication(); diff --git a/web/components/issues/issue-layouts/filters/header/filters/filters-selection.tsx b/web/components/issues/issue-layouts/filters/header/filters/filters-selection.tsx index b1090aed2..19e3ec841 100644 --- a/web/components/issues/issue-layouts/filters/header/filters/filters-selection.tsx +++ b/web/components/issues/issue-layouts/filters/header/filters/filters-selection.tsx @@ -42,7 +42,7 @@ export const FilterSelection: React.FC = observer((props) => { useEffect(() => { if (debouncedValue && onSearchCapture) onSearchCapture(); - }, [debouncedValue]); + }, [debouncedValue, onSearchCapture]); return (
diff --git a/web/components/issues/issue-layouts/kanban/block.tsx b/web/components/issues/issue-layouts/kanban/block.tsx index 15ee24b07..fb83a14e3 100644 --- a/web/components/issues/issue-layouts/kanban/block.tsx +++ b/web/components/issues/issue-layouts/kanban/block.tsx @@ -44,7 +44,7 @@ const KanbanIssueDetailsBlock: React.FC = observer((prop // hooks const { getProjectById } = useProject(); const { - router: { workspaceSlug, projectId }, + router: { workspaceSlug }, } = useApplication(); const { setPeekIssue } = useIssueDetail(); diff --git a/web/components/issues/issue-layouts/kanban/headers/group-by-card.tsx b/web/components/issues/issue-layouts/kanban/headers/group-by-card.tsx index ec9742baf..440b379b8 100644 --- a/web/components/issues/issue-layouts/kanban/headers/group-by-card.tsx +++ b/web/components/issues/issue-layouts/kanban/headers/group-by-card.tsx @@ -3,7 +3,7 @@ import { useRouter } from "next/router"; // components import { CustomMenu } from "@plane/ui"; import { ExistingIssuesListModal } from "components/core"; -import { CreateUpdateIssueModal, CreateUpdateDraftIssueModal } from "components/issues"; +import { CreateUpdateIssueModal } from "components/issues"; // lucide icons import { Minimize2, Maximize2, Circle, Plus } from "lucide-react"; // hooks diff --git a/web/components/issues/issue-layouts/list/block.tsx b/web/components/issues/issue-layouts/list/block.tsx index 26537c3a5..7a34311cc 100644 --- a/web/components/issues/issue-layouts/list/block.tsx +++ b/web/components/issues/issue-layouts/list/block.tsx @@ -24,7 +24,7 @@ export const IssueBlock: React.FC = observer((props: IssueBlock const { issuesMap, issueId, handleIssues, quickActions, displayProperties, canEditProperties } = props; // hooks const { - router: { workspaceSlug, projectId }, + router: { workspaceSlug }, } = useApplication(); const { getProjectById } = useProject(); const { peekIssue, setPeekIssue } = useIssueDetail(); diff --git a/web/components/issues/issue-layouts/list/headers/group-by-card.tsx b/web/components/issues/issue-layouts/list/headers/group-by-card.tsx index 5a6b3c462..8d9164b37 100644 --- a/web/components/issues/issue-layouts/list/headers/group-by-card.tsx +++ b/web/components/issues/issue-layouts/list/headers/group-by-card.tsx @@ -2,7 +2,7 @@ import { useRouter } from "next/router"; // lucide icons import { CircleDashed, Plus } from "lucide-react"; // components -import { CreateUpdateIssueModal, CreateUpdateDraftIssueModal } from "components/issues"; +import { CreateUpdateIssueModal } from "components/issues"; import { ExistingIssuesListModal } from "components/core"; import { CustomMenu } from "@plane/ui"; // mobx diff --git a/web/components/issues/issue-modal/modal.tsx b/web/components/issues/issue-modal/modal.tsx index b6a3eecc3..339045b90 100644 --- a/web/components/issues/issue-modal/modal.tsx +++ b/web/components/issues/issue-modal/modal.tsx @@ -3,7 +3,7 @@ import { useRouter } from "next/router"; import { observer } from "mobx-react-lite"; import { Dialog, Transition } from "@headlessui/react"; // hooks -import { useApplication, useEventTracker, useCycle, useIssues, useModule, useProject, useWorkspace } from "hooks/store"; +import { useApplication, useEventTracker, useCycle, useIssues, useModule, useProject } from "hooks/store"; import useToast from "hooks/use-toast"; import useLocalStorage from "hooks/use-local-storage"; // components @@ -44,7 +44,6 @@ export const CreateUpdateIssueModal: React.FC = observer((prop const { router: { workspaceSlug, projectId, cycleId, moduleId, viewId: projectViewId }, } = useApplication(); - const { currentWorkspace } = useWorkspace(); const { workspaceProjectIds } = useProject(); const { fetchCycleDetails } = useCycle(); const { fetchModuleDetails } = useModule(); diff --git a/web/components/issues/peek-overview/root.tsx b/web/components/issues/peek-overview/root.tsx index 12cd35093..eb8ad0aa7 100644 --- a/web/components/issues/peek-overview/root.tsx +++ b/web/components/issues/peek-overview/root.tsx @@ -85,7 +85,7 @@ export const IssuePeekOverview: FC = observer((props) => { showToast: boolean = true ) => { try { - const response = await updateIssue(workspaceSlug, projectId, issueId, data); + await updateIssue(workspaceSlug, projectId, issueId, data); if (showToast) setToastAlert({ title: "Issue updated successfully", @@ -116,9 +116,8 @@ export const IssuePeekOverview: FC = observer((props) => { }, remove: async (workspaceSlug: string, projectId: string, issueId: string) => { try { - let response; - if (is_archived) response = await removeArchivedIssue(workspaceSlug, projectId, issueId); - else response = await removeIssue(workspaceSlug, projectId, issueId); + if (is_archived) await removeArchivedIssue(workspaceSlug, projectId, issueId); + else await removeIssue(workspaceSlug, projectId, issueId); setToastAlert({ title: "Issue deleted successfully", type: "success", diff --git a/web/components/issues/sub-issues/root.tsx b/web/components/issues/sub-issues/root.tsx index 881ea4f2c..27e6a9d7a 100644 --- a/web/components/issues/sub-issues/root.tsx +++ b/web/components/issues/sub-issues/root.tsx @@ -273,7 +273,17 @@ export const SubIssuesRoot: FC = observer((props) => { } }, }), - [fetchSubIssues, createSubIssues, updateSubIssue, removeSubIssue, deleteSubIssue, setToastAlert, setSubIssueHelpers] + [ + fetchSubIssues, + createSubIssues, + updateSubIssue, + removeSubIssue, + deleteSubIssue, + setToastAlert, + setSubIssueHelpers, + captureIssueEvent, + router.asPath, + ] ); const issue = getIssueById(parentIssueId); diff --git a/web/components/project/delete-project-modal.tsx b/web/components/project/delete-project-modal.tsx index 791ac3672..16f1fd694 100644 --- a/web/components/project/delete-project-modal.tsx +++ b/web/components/project/delete-project-modal.tsx @@ -4,7 +4,7 @@ import { Controller, useForm } from "react-hook-form"; import { Dialog, Transition } from "@headlessui/react"; import { AlertTriangle } from "lucide-react"; // hooks -import { useEventTracker, useProject, useWorkspace } from "hooks/store"; +import { useEventTracker, useProject } from "hooks/store"; import useToast from "hooks/use-toast"; // ui import { Button, Input } from "@plane/ui"; @@ -28,7 +28,6 @@ export const DeleteProjectModal: React.FC = (props) => { const { isOpen, project, onClose } = props; // store hooks const { captureProjectEvent } = useEventTracker(); - const { currentWorkspace } = useWorkspace(); const { deleteProject } = useProject(); // router const router = useRouter(); diff --git a/web/components/project/send-project-invitation-modal.tsx b/web/components/project/send-project-invitation-modal.tsx index 7c02ce8d0..1fc4b7705 100644 --- a/web/components/project/send-project-invitation-modal.tsx +++ b/web/components/project/send-project-invitation-modal.tsx @@ -5,16 +5,14 @@ import { useForm, Controller, useFieldArray } from "react-hook-form"; import { Dialog, Transition } from "@headlessui/react"; import { ChevronDown, Plus, X } from "lucide-react"; // hooks -import { useEventTracker, useMember, useUser, useWorkspace } from "hooks/store"; +import { useEventTracker, useMember, useUser } from "hooks/store"; import useToast from "hooks/use-toast"; // ui import { Avatar, Button, CustomSelect, CustomSearchSelect } from "@plane/ui"; -// helpers -import { getUserRole } from "helpers/user.helper"; // constants -import { ROLE } from "constants/workspace"; import { EUserProjectRoles } from "constants/project"; import { PROJECT_MEMBER_ADDED } from "constants/event-tracker"; +import { ROLE } from "constants/workspace"; type Props = { isOpen: boolean; diff --git a/web/components/project/settings/features-list.tsx b/web/components/project/settings/features-list.tsx index 22e69827e..77239304c 100644 --- a/web/components/project/settings/features-list.tsx +++ b/web/components/project/settings/features-list.tsx @@ -4,7 +4,7 @@ import { observer } from "mobx-react-lite"; import { ContrastIcon, FileText, Inbox, Layers } from "lucide-react"; import { DiceIcon, ToggleSwitch } from "@plane/ui"; // hooks -import { useEventTracker, useProject, useUser, useWorkspace } from "hooks/store"; +import { useEventTracker, useProject, useUser } from "hooks/store"; import useToast from "hooks/use-toast"; // types import { IProject } from "@plane/types"; diff --git a/web/components/project/sidebar-list-item.tsx b/web/components/project/sidebar-list-item.tsx index 3dbaa044d..df8d58ed6 100644 --- a/web/components/project/sidebar-list-item.tsx +++ b/web/components/project/sidebar-list-item.tsx @@ -83,7 +83,7 @@ export const ProjectSidebarListItem: React.FC = observer((props) => { // store hooks const { theme: themeStore } = useApplication(); const { setTrackElement } = useEventTracker(); - const { currentProjectDetails, addProjectToFavorites, removeProjectFromFavorites, getProjectById } = useProject(); + const { addProjectToFavorites, removeProjectFromFavorites, getProjectById } = useProject(); const { getInboxesByProjectId, getInboxById } = useInbox(); // states const [leaveProjectModalOpen, setLeaveProjectModal] = useState(false); @@ -145,7 +145,7 @@ export const ProjectSidebarListItem: React.FC = observer((props) => { if (window.innerWidth < 768) { themeStore.toggleMobileSidebar(); } - setTrackElement('Project sidebar'); + setTrackElement("Project sidebar"); }; useOutsideClickDetector(actionSectionRef, () => setIsMenuActive(false)); diff --git a/web/components/workspace/sidebar-dropdown.tsx b/web/components/workspace/sidebar-dropdown.tsx index 4783a6fcc..ade89555a 100644 --- a/web/components/workspace/sidebar-dropdown.tsx +++ b/web/components/workspace/sidebar-dropdown.tsx @@ -8,7 +8,7 @@ import { mutate } from "swr"; import { Check, ChevronDown, CircleUserRound, LogOut, Mails, PlusSquare, Settings, UserCircle2 } from "lucide-react"; import { usePopper } from "react-popper"; // hooks -import { useApplication, useEventTracker, useUser, useWorkspace } from "hooks/store"; +import { useApplication, useUser, useWorkspace } from "hooks/store"; // hooks import useToast from "hooks/use-toast"; // ui diff --git a/web/lib/posthog-provider.tsx b/web/lib/posthog-provider.tsx index 0f3669275..7f7a7760d 100644 --- a/web/lib/posthog-provider.tsx +++ b/web/lib/posthog-provider.tsx @@ -54,7 +54,7 @@ const PostHogProvider: FC = (props) => { posthog?.identify(user.email); posthog?.group(GROUP_WORKSPACE, currentWorkspaceId); } - }, [currentWorkspaceId, user]); + }, [currentWorkspaceId, lastWorkspaceId, user]); useEffect(() => { // Track page views