File tree Expand file tree Collapse file tree 7 files changed +42
-6
lines changed Expand file tree Collapse file tree 7 files changed +42
-6
lines changed Original file line number Diff line number Diff line change 1+ export const formatDateTime = ( date : string ) => new Date ( date ) . toLocaleString ( ) ;
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import {
2222} from "../contexts" ;
2323import { BuildStatusChip } from "./BuildStatusChip" ;
2424import { SkeletonList } from "./SkeletonList" ;
25+ import { formatDateTime } from "../_helpers/format.helper" ;
2526
2627const 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+ { formatDateTime ( build . createdAt ) }
7980 </ Typography >
8081 </ Grid >
8182 < Grid item >
Original file line number Diff line number Diff line change 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+ } ;
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ import {
2727import { Link } from "react-router-dom" ;
2828import { Delete , Add } from "@material-ui/icons" ;
2929import { routes } from "../constants" ;
30+ import { formatDateTime } from "../_helpers/format.helper" ;
3031
3132const ProjectsListPage = ( ) => {
3233 const theme = useTheme ( ) ;
@@ -115,7 +116,7 @@ const ProjectsListPage = () => {
115116 < CardContent >
116117 < Typography > Key: { project . id } </ Typography >
117118 < Typography > Name: { project . name } </ Typography >
118- < Typography > Updated : { project . updatedAt } </ Typography >
119+ < Typography > Created : { formatDateTime ( project . createdAt ) } </ Typography >
119120 </ CardContent >
120121 < CardActions >
121122 < Button
Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -4,5 +4,6 @@ export interface Project {
44 id : string ;
55 name : string ;
66 builds : Build [ ] ;
7- updatedAt : Date ;
7+ updatedAt : string ;
8+ createdAt : string ;
89}
You can’t perform that action at this time.
0 commit comments