Browse Source

fix lint error

ryoji-s 2 years ago
parent
commit
4208d17051
1 changed files with 2 additions and 4 deletions
  1. 2 4
      packages/core/src/utils/page-path-utils/index.ts

+ 2 - 4
packages/core/src/utils/page-path-utils/index.ts

@@ -1,7 +1,5 @@
 import escapeStringRegexp from 'escape-string-regexp';
 
-import { IUser, IUserHasId } from '~/interfaces/user';
-
 import { isValidObjectId } from '../objectid-utils';
 import { addTrailingSlash } from '../path-utils';
 
@@ -126,8 +124,8 @@ export const isCreatablePage = (path: string): boolean => {
  * return user's homepage path
  * @param user
  */
-export const userHomepagePath = (user?: string | IUser | IUserHasId): string => {
-  if (typeof user === 'string' || !user || !user.username) {
+export const userHomepagePath = (user: any): string => {
+  if (!user || !user.username) {
     return '';
   }
   return `/user/${user.username}`;