Yuki Takei 4 лет назад
Родитель
Сommit
1cd56f80d1

+ 1 - 1
packages/app/src/server/models/user-ui-settings.ts

@@ -11,7 +11,7 @@ import { IUserUISettings } from '~/interfaces/user-ui-settings';
 export interface UserUISettingsDocument extends IUserUISettings, Document {}
 export type UserUISettingsModel = Model<UserUISettingsDocument>
 
-const schema = new Schema<IUserUISettings>({
+const schema = new Schema<UserUISettingsDocument, UserUISettingsModel>({
   user: { type: Schema.Types.ObjectId, ref: 'User', index: true },
   isSidebarCollapsed: { type: Boolean, default: false },
   currentSidebarContents: {

+ 1 - 1
packages/app/src/stores/context.tsx

@@ -20,7 +20,7 @@ export const useIsSharedUser = (): SWRResponse<boolean, Error> => {
   const isLoading = currentUser === undefined || currentPagePath === undefined;
 
   const key = isLoading ? null : 'isSharedUser';
-  const value = !isLoading && currentUser == null && pagePathUtils.isSharedPage(currentPagePath);
+  const value = !isLoading && currentUser == null && pagePathUtils.isSharedPage(currentPagePath as string);
 
   return useStaticSWR(key, value);
 };

+ 1 - 1
packages/ui/src/utils/browser-utils.ts

@@ -1,4 +1,4 @@
-import { Breakpoint } from '~/interfaces/breakpoints';
+import { Breakpoint } from '../interfaces/breakpoints';
 
 
 export const addBreakpointListener = (