Browse Source

user page root refactor to user homepage path

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

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

@@ -121,15 +121,11 @@ export const isCreatablePage = (path: string): boolean => {
 };
 
 /**
- * return user path
- * @param user
+ * return user's homepage path
+ * @param username
  */
-// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
-export const userPageRoot = (user: any): string => {
-  if (!user || !user.username) {
-    return '';
-  }
-  return `/user/${user.username}`;
+export const userHomepagePath = (username: string): string => {
+  return `/user/${username}`;
 };
 
 /**