no log: Remove moment.js from frontend since we don't use it anymore

pull/1358/head
LASER-Yi 4 years ago
parent 26dc35556e
commit 677cf75deb

@ -32,7 +32,6 @@
"axios": "^0.21.0", "axios": "^0.21.0",
"bootstrap": "^4.0.0", "bootstrap": "^4.0.0",
"lodash": "^4.0.0", "lodash": "^4.0.0",
"moment": "^2.29.1",
"rc-slider": "^9.7.1", "rc-slider": "^9.7.1",
"react": "^16.0.0", "react": "^16.0.0",
"react-bootstrap": "^1.0.0", "react-bootstrap": "^1.0.0",
@ -12761,14 +12760,6 @@
"mkdirp": "bin/cmd.js" "mkdirp": "bin/cmd.js"
} }
}, },
"node_modules/moment": {
"version": "2.29.1",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz",
"integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==",
"engines": {
"node": "*"
}
},
"node_modules/move-concurrently": { "node_modules/move-concurrently": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz",
@ -32045,11 +32036,6 @@
"minimist": "^1.2.5" "minimist": "^1.2.5"
} }
}, },
"moment": {
"version": "2.29.1",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz",
"integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ=="
},
"move-concurrently": { "move-concurrently": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz",

@ -37,7 +37,6 @@
"axios": "^0.21.0", "axios": "^0.21.0",
"bootstrap": "^4.0.0", "bootstrap": "^4.0.0",
"lodash": "^4.0.0", "lodash": "^4.0.0",
"moment": "^2.29.1",
"rc-slider": "^9.7.1", "rc-slider": "^9.7.1",
"react": "^16.0.0", "react": "^16.0.0",
"react-bootstrap": "^1.0.0", "react-bootstrap": "^1.0.0",

@ -11,7 +11,6 @@ import {
FontAwesomeIconProps, FontAwesomeIconProps,
} from "@fortawesome/react-fontawesome"; } from "@fortawesome/react-fontawesome";
import { isNull, isUndefined } from "lodash"; import { isNull, isUndefined } from "lodash";
import moment from "moment";
import React, { FunctionComponent, useMemo } from "react"; import React, { FunctionComponent, useMemo } from "react";
import { import {
OverlayTrigger, OverlayTrigger,
@ -98,22 +97,6 @@ export const LoadingIndicator: FunctionComponent<{
); );
}; };
interface FormatterProps {
format?: string;
children: string | Date;
}
export const DateFormatter: FunctionComponent<FormatterProps> = ({
children,
format,
}) => {
const result = useMemo(
() => moment(children, format ?? "DD/MM/YYYY h:mm:ss").fromNow(),
[children, format]
);
return <span>{result}</span>;
};
interface LanguageTextProps { interface LanguageTextProps {
text: Language; text: Language;
className?: string; className?: string;

Loading…
Cancel
Save