import React from 'react'; import PropTypes from 'prop-types'; import { userPageRoot } from '@commons/util/path-utils'; import UserPicture from '../User/UserPicture'; const AuthorInfo = (props) => { const { mode, user, date, locate, } = props; const infoLabelForSubNav = mode === 'create' ? 'Created by' : 'Updated by'; const infoLabelForFooter = mode === 'create' ? 'Last revision posted at' : 'Created at'; const userLabel = user != null ? {user.name} : Unknown; if (locate === 'footer') { return
{infoLabelForFooter} {date} by