|
|
@@ -1,8 +1,8 @@
|
|
|
import React from 'react';
|
|
|
import { format } from 'date-fns';
|
|
|
-import { UserPicture } from '@growi/ui';
|
|
|
import { pagePathUtils } from '@growi/core';
|
|
|
import type { IUser } from '@growi/core';
|
|
|
+import { UserPicture } from '@growi/ui';
|
|
|
import Link from 'next/link';
|
|
|
|
|
|
type AuthorInfoProps = {
|
|
|
@@ -17,8 +17,6 @@ export const AuthorInfo = (props: AuthorInfoProps): JSX.Element => {
|
|
|
date, user, mode = 'create', locate = 'subnav',
|
|
|
} = props;
|
|
|
|
|
|
- console.log(mode, locate)
|
|
|
-
|
|
|
const { userPageRoot } = pagePathUtils;
|
|
|
const formatType = 'yyyy/MM/dd HH:mm';
|
|
|
|
|
|
@@ -41,11 +39,11 @@ export const AuthorInfo = (props: AuthorInfoProps): JSX.Element => {
|
|
|
|
|
|
if (locate === 'footer') {
|
|
|
try {
|
|
|
- return <p>{infoLabelForFooter} {format(new Date(date), formatType)} by <UserPicture user={user} size="sm" /> {userLabel}</p>;
|
|
|
+ return <p>{infoLabelForFooter} {format(new Date(date), formatType)} by <UserPicture user={user} size="sm"/> {userLabel}</p>;
|
|
|
}
|
|
|
catch (err) {
|
|
|
if (err instanceof RangeError) {
|
|
|
- return <p>{nullinfoLabelForFooter} <UserPicture user={user} size="sm" /> {userLabel}</p>;
|
|
|
+ return <p>{nullinfoLabelForFooter} <UserPicture user={user} size="sm"/> {userLabel}</p>;
|
|
|
}
|
|
|
return <></>;
|
|
|
}
|
|
|
@@ -63,7 +61,7 @@ export const AuthorInfo = (props: AuthorInfoProps): JSX.Element => {
|
|
|
return (
|
|
|
<div className="d-flex align-items-center">
|
|
|
<div className="mr-2">
|
|
|
- <UserPicture user={user} size="sm" />
|
|
|
+ <UserPicture user={user} size="sm"/>
|
|
|
</div>
|
|
|
<div>
|
|
|
<div>{infoLabelForSubNav} {userLabel}</div>
|