1
0
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:
杨国璇
2024-10-21 11:29:17 +08:00
committed by GitHub
parent 21085997e3
commit 8200113b7f
142 changed files with 823 additions and 538 deletions

View File

@@ -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>
);
})