File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -43,8 +43,7 @@ import { type MatchedProject } from "~/hooks/useProject";
4343import { useHasAdminAccess } from "~/hooks/useUser" ;
4444import { useShortcutKeys } from "~/hooks/useShortcutKeys" ;
4545import { ShortcutKey } from "../primitives/ShortcutKey" ;
46- import { type User } from "~/models/user.server" ;
47- import { type DashboardPreferences } from "~/services/dashboardPreferences.server" ;
46+ import { type UserWithDashboardPreferences } from "~/models/user.server" ;
4847import { useCurrentPlan } from "~/routes/_app.orgs.$organizationSlug/route" ;
4948import { type FeedbackType } from "~/routes/resources.feedback" ;
5049import { IncidentStatusPanel } from "~/routes/resources.incidents" ;
@@ -105,9 +104,8 @@ import { SideMenuHeader } from "./SideMenuHeader";
105104import { SideMenuItem } from "./SideMenuItem" ;
106105import { SideMenuSection } from "./SideMenuSection" ;
107106
108- type SideMenuUser = Pick < User , "email" | "admin" > & {
107+ type SideMenuUser = Pick < UserWithDashboardPreferences , "email" | "admin" | "dashboardPreferences "> & {
109108 isImpersonating : boolean ;
110- dashboardPreferences : DashboardPreferences ;
111109} ;
112110export type SideMenuProject = Pick <
113111 MatchedProject ,
Original file line number Diff line number Diff line change 1- import { UIMatch } from "@remix-run/react" ;
2- import type { User } from "~/models/user.server" ;
3- import { loader } from "~/root" ;
1+ import { type UIMatch } from "@remix-run/react" ;
2+ import type { UserWithDashboardPreferences } from "~/models/user.server" ;
3+ import { type loader } from "~/root" ;
44import { useChanged } from "./useChanged" ;
55import { useTypedMatchesData } from "./useTypedMatchData" ;
66import { useIsImpersonating } from "./useOrganizations" ;
77
8+ export type User = UserWithDashboardPreferences ;
9+
810export function useOptionalUser ( matches ?: UIMatch [ ] ) : User | undefined {
911 const routeMatch = useTypedMatchesData < typeof loader > ( {
1012 id : "root" ,
You can’t perform that action at this time.
0 commit comments