diff --git a/ui/package-lock.json b/ui/package-lock.json index d5373b0..f251c83 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -27,7 +27,6 @@ "@types/react-dom": "^18.0.8", "graphql-request": "^5.0.0", "graphql-tag": "^2.12.6", - "moment": "^2.29.4", "oidc-client-ts": "^2.1.0", "react": "^18.2.0", "react-admin": "^4.4.4", @@ -12932,14 +12931,6 @@ "mkdirp": "bin/cmd.js" } }, - "node_modules/moment": { - "version": "2.29.4", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", - "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==", - "engines": { - "node": "*" - } - }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -27652,11 +27643,6 @@ "minimist": "^1.2.6" } }, - "moment": { - "version": "2.29.4", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", - "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==" - }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", diff --git a/ui/package.json b/ui/package.json index 9399a3a..0983c53 100644 --- a/ui/package.json +++ b/ui/package.json @@ -22,7 +22,6 @@ "@types/react-dom": "^18.0.8", "graphql-request": "^5.0.0", "graphql-tag": "^2.12.6", - "moment": "^2.29.4", "oidc-client-ts": "^2.1.0", "react": "^18.2.0", "react-admin": "^4.4.4", @@ -61,4 +60,4 @@ ] }, "proxy": "http://localhost:8080" -} +} \ No newline at end of file diff --git a/ui/src/scenes/feed/index.tsx b/ui/src/scenes/feed/index.tsx index cfb5f3d..c9a73fb 100644 --- a/ui/src/scenes/feed/index.tsx +++ b/ui/src/scenes/feed/index.tsx @@ -11,7 +11,6 @@ import ListItemAvatar from "@mui/material/ListItemAvatar"; import Avatar from "@mui/material/Avatar"; import LinearProgress from "@mui/material/LinearProgress"; import { VersionData } from "../../types/version"; -import moment from "moment"; const Feed = () => { const { data, isLoading } = useGqlQuery( @@ -63,7 +62,14 @@ const Feed = () => { component="span" color="text.primary" > - {moment(version.timestamp).format("llll")} + {new Date(version.timestamp).toLocaleDateString()} + {" "} + + {new Date(version.timestamp).toLocaleTimeString()} } diff --git a/ui/src/scenes/last/index.tsx b/ui/src/scenes/last/index.tsx index 6bfb1dc..24b24f6 100644 --- a/ui/src/scenes/last/index.tsx +++ b/ui/src/scenes/last/index.tsx @@ -4,7 +4,6 @@ import Header from "../../components/Header"; import { useGqlQuery } from "../../utils/http"; import gql from "graphql-tag"; import { VersionData } from "../../types/version"; -import moment from "moment"; const LastVersions = () => { const { data, isLoading } = useGqlQuery( @@ -64,8 +63,7 @@ const LastVersions = () => { headerName: "Date", flex: 1, type: "dateTime", - valueGetter: ({ value }: { value: string }) => - value && moment(value).format("llll"), + valueGetter: ({ value }: { value: string }) => value && new Date(value), }, ]; diff --git a/ui/src/scenes/versions/index.tsx b/ui/src/scenes/versions/index.tsx index 547287a..19ad86b 100644 --- a/ui/src/scenes/versions/index.tsx +++ b/ui/src/scenes/versions/index.tsx @@ -4,7 +4,6 @@ import Header from "../../components/Header"; import { useGqlQuery } from "../../utils/http"; import gql from "graphql-tag"; import { VersionData } from "../../types/version"; -import moment from "moment"; const Versions = () => { const { data, isLoading } = useGqlQuery( @@ -64,8 +63,7 @@ const Versions = () => { headerName: "Date", flex: 1, type: "dateTime", - valueGetter: ({ value }: { value: string }) => - value && moment(value).format("llll"), + valueGetter: ({ value }: { value: string }) => value && new Date(value), }, ];