diff --git a/frontend/package-lock.json b/frontend/package-lock.json index f64459d92..ef31fbb2a 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -32,7 +32,6 @@ "axios": "^0.21.0", "bootstrap": "^4.0.0", "lodash": "^4.0.0", - "moment": "^2.29.1", "rc-slider": "^9.7.1", "react": "^16.0.0", "react-bootstrap": "^1.0.0", @@ -12761,14 +12760,6 @@ "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": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", @@ -32045,11 +32036,6 @@ "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": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", diff --git a/frontend/package.json b/frontend/package.json index da8053e0b..405f05c80 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -37,7 +37,6 @@ "axios": "^0.21.0", "bootstrap": "^4.0.0", "lodash": "^4.0.0", - "moment": "^2.29.1", "rc-slider": "^9.7.1", "react": "^16.0.0", "react-bootstrap": "^1.0.0", diff --git a/frontend/src/components/index.tsx b/frontend/src/components/index.tsx index 2bec9df67..c8221f3d8 100644 --- a/frontend/src/components/index.tsx +++ b/frontend/src/components/index.tsx @@ -11,7 +11,6 @@ import { FontAwesomeIconProps, } from "@fortawesome/react-fontawesome"; import { isNull, isUndefined } from "lodash"; -import moment from "moment"; import React, { FunctionComponent, useMemo } from "react"; import { OverlayTrigger, @@ -98,22 +97,6 @@ export const LoadingIndicator: FunctionComponent<{ ); }; -interface FormatterProps { - format?: string; - children: string | Date; -} - -export const DateFormatter: FunctionComponent = ({ - children, - format, -}) => { - const result = useMemo( - () => moment(children, format ?? "DD/MM/YYYY h:mm:ss").fromNow(), - [children, format] - ); - return {result}; -}; - interface LanguageTextProps { text: Language; className?: string;