mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-05 17:02:47 +00:00
feat: optimize commonjs (#6906)
Co-authored-by: 杨国璇 <ygx@Hello-word.local>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import moment from 'moment';
|
||||
import dayjs from 'dayjs';
|
||||
import relativeTime from 'dayjs/plugin/relativeTime';
|
||||
import { Button, Modal, ModalHeader, ModalBody, ModalFooter, Table } from 'reactstrap';
|
||||
import { gettext, siteRoot } from '../../utils/constants';
|
||||
import { Utils } from '../../utils/utils';
|
||||
@@ -10,6 +11,8 @@ const propTypes = {
|
||||
toggleCancel: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
dayjs.extend(relativeTime);
|
||||
|
||||
class ListCreatedFileDialog extends React.Component {
|
||||
|
||||
toggle = (activity) => {
|
||||
@@ -40,7 +43,7 @@ class ListCreatedFileDialog extends React.Component {
|
||||
return (
|
||||
<tr key={index}>
|
||||
<td>{fileLink}</td>
|
||||
<td>{moment(item.time).fromNow()}</td>
|
||||
<td>{dayjs(item.time).fromNow()}</td>
|
||||
</tr>
|
||||
);
|
||||
})
|
||||
|
Reference in New Issue
Block a user