Skip to content

Commit

Permalink
fix: Revert local times
Browse files Browse the repository at this point in the history
  • Loading branch information
NoUseFreak committed Dec 20, 2022
1 parent 3da3109 commit e44df39
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 24 deletions.
14 changes: 0 additions & 14 deletions ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -61,4 +60,4 @@
]
},
"proxy": "http://localhost:8080"
}
}
10 changes: 8 additions & 2 deletions ui/src/scenes/feed/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -63,7 +62,14 @@ const Feed = () => {
component="span"
color="text.primary"
>
{moment(version.timestamp).format("llll")}
{new Date(version.timestamp).toLocaleDateString()}
</Typography>{" "}
<Typography
sx={{ display: "inline" }}
component="span"
color="text.secondary"
>
{new Date(version.timestamp).toLocaleTimeString()}
</Typography>
</React.Fragment>
}
Expand Down
4 changes: 1 addition & 3 deletions ui/src/scenes/last/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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),
},
];

Expand Down
4 changes: 1 addition & 3 deletions ui/src/scenes/versions/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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),
},
];

Expand Down

0 comments on commit e44df39

Please sign in to comment.