Просмотр исходного кода

refactor PageCreator -> AuthorInfo

Yuki Takei 5 лет назад
Родитель
Сommit
4c21b4f1d9

+ 4 - 4
src/client/js/components/Navbar/PageCreator.jsx → src/client/js/components/Navbar/AuthorInfo.jsx

@@ -5,7 +5,7 @@ import { userPageRoot } from '@commons/util/path-utils';
 
 import UserPicture from '../User/UserPicture';
 
-const PageCreator = (props) => {
+const AuthorInfo = (props) => {
   const { mode, user, date } = props;
 
   const infoLabel = mode === 'create'
@@ -28,15 +28,15 @@ const PageCreator = (props) => {
   );
 };
 
-PageCreator.propTypes = {
+AuthorInfo.propTypes = {
   date: PropTypes.string.isRequired,
   user: PropTypes.object,
   mode: PropTypes.oneOf(['create', 'update']),
 };
 
-PageCreator.defaultProps = {
+AuthorInfo.defaultProps = {
   mode: 'create',
 };
 
 
-export default PageCreator;
+export default AuthorInfo;

+ 3 - 3
src/client/js/components/Navbar/GrowiSubNavigation.jsx

@@ -19,7 +19,7 @@ import TagLabels from '../Page/TagLabels';
 import LikeButton from '../LikeButton';
 import BookmarkButton from '../BookmarkButton';
 
-import PageCreator from './PageCreator';
+import AuthorInfo from './AuthorInfo';
 import DrawerToggler from './DrawerToggler';
 import UserPicture from '../User/UserPicture';
 
@@ -200,10 +200,10 @@ const GrowiSubNavigation = (props) => {
         { (!isCompactMode && !isUserPage) && (
           <ul className="authors text-nowrap border-left d-none d-lg-block d-edit-none">
             <li className="pb-1">
-              <PageCreator user={creator} date={createdAt} />
+              <AuthorInfo user={creator} date={createdAt} />
             </li>
             <li className="mt-1 pt-1 border-top">
-              <PageCreator user={revisionAuthor} date={updatedAt} mode="update" />
+              <AuthorInfo user={revisionAuthor} date={updatedAt} mode="update" />
             </li>
           </ul>
         ) }