Explorar o código

fix lint error

ryoji-s %!s(int64=2) %!d(string=hai) anos
pai
achega
4208d17051
Modificáronse 1 ficheiros con 2 adicións e 4 borrados
  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}`;