Skip to content

Commit 8279f5d

Browse files
committed
added
1 parent 65f0b11 commit 8279f5d

File tree

6 files changed

+39
-5
lines changed

6 files changed

+39
-5
lines changed

src/_helpers/format.helper.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const formatDate = (date: string) => new Date(date).toLocaleString();

src/components/BuildList.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import {
2222
} from "../contexts";
2323
import { BuildStatusChip } from "./BuildStatusChip";
2424
import { SkeletonList } from "./SkeletonList";
25+
import { formatDate } from "../_helpers/format.helper";
2526

2627
const useStyles = makeStyles((theme: Theme) =>
2728
createStyles({
@@ -75,7 +76,7 @@ const BuildList: FunctionComponent = () => {
7576
<Grid container direction="column">
7677
<Grid item>
7778
<Typography variant="caption" color="textPrimary">
78-
{build.createdAt}
79+
{formatDate(build.createdAt)}
7980
</Typography>
8081
</Grid>
8182
<Grid item>

src/components/DateFormated.tsx

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import React from "react";
2+
import {
3+
Button,
4+
Popper,
5+
Fade,
6+
Paper,
7+
makeStyles,
8+
TextField,
9+
Badge,
10+
IconButton,
11+
} from "@material-ui/core";
12+
import {
13+
usePopupState,
14+
bindToggle,
15+
bindPopper,
16+
} from "material-ui-popup-state/hooks";
17+
import { Comment } from "@material-ui/icons";
18+
19+
interface IProps {
20+
text: string | undefined;
21+
}
22+
23+
export const DateFormatted: React.FunctionComponent<IProps> = ({
24+
text,
25+
}) => {
26+
27+
return (
28+
<React.Fragment>
29+
30+
</React.Fragment>
31+
);
32+
};

src/types/baseline.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export interface Baseline {
55
baselineName: string;
66
testRunId: string;
77
testVariationId: string;
8-
createdAt: Date;
9-
updatedAt: Date;
8+
createdAt: string;
9+
updatedAt: string;
1010
testRun: TestRun;
1111
}

src/types/build.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export interface Build {
66
projectName: string;
77
branchName: string;
88
status: BuildStatus;
9-
createdAt: Date;
9+
createdAt: string;
1010
createdBy: string;
1111
testRuns: TestRun[];
1212

src/types/project.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ export interface Project {
44
id: string;
55
name: string;
66
builds: Build[];
7-
updatedAt: Date;
7+
updatedAt: string;
88
}

0 commit comments

Comments
 (0)