ryoji-s 2 лет назад
Родитель
Сommit
9252a86627

+ 1 - 2
apps/app/src/components/Navbar/AuthorInfo.tsx

@@ -18,7 +18,6 @@ export const AuthorInfo = (props: AuthorInfoProps): JSX.Element => {
     date, user, mode = 'create', locate = 'subnav',
   } = props;
 
-  const { userHomepagePath } = pagePathUtils;
   const formatType = 'yyyy/MM/dd HH:mm';
 
   const infoLabelForSubNav = mode === 'create'
@@ -32,7 +31,7 @@ export const AuthorInfo = (props: AuthorInfoProps): JSX.Element => {
     : 'Last revision posted at';
   const userLabel = user != null
     ? (
-      <Link href={userHomepagePath(user)} prefetch={false}>
+      <Link href={pagePathUtils.userHomepagePath(user)} prefetch={false}>
         {user.name}
       </Link>
     )

+ 1 - 3
packages/ui/src/components/UserPicture.tsx

@@ -11,8 +11,6 @@ import type { UncontrolledTooltipProps } from 'reactstrap';
 
 const UncontrolledTooltip = dynamic<UncontrolledTooltipProps>(() => import('reactstrap').then(mod => mod.UncontrolledTooltip), { ssr: false });
 
-const { userHomepagePath } = pagePathUtils;
-
 const DEFAULT_IMAGE = '/images/icons/user.svg';
 
 
@@ -30,7 +28,7 @@ const UserPictureRootWithLink = forwardRef<HTMLSpanElement, UserPictureRootProps
   const router = useRouter();
 
   const { user } = props;
-  const href = userHomepagePath(user);
+  const href = pagePathUtils.userHomepagePath(user);
 
   const clickHandler = useCallback(() => {
     router.push(href);