diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/components/DateString/DateString.tsx | 2 | ||||
-rw-r--r-- | src/containers/Profile/ProfileInfo.tsx | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/components/DateString/DateString.tsx b/src/components/DateString/DateString.tsx index 3f2ceb2..7c824cd 100644 --- a/src/components/DateString/DateString.tsx +++ b/src/components/DateString/DateString.tsx @@ -32,7 +32,7 @@ const DateString: React.FC<PropTypes> = ({ value }) => { const compact = useMemo(() => compactDateString(date), [date]); return ( - <div className={classes.root} onClick={toggleScompact}> + <div role="presentation" className={classes.root} onClick={toggleScompact}> {isCompact ? compact : formatted} </div> ); diff --git a/src/containers/Profile/ProfileInfo.tsx b/src/containers/Profile/ProfileInfo.tsx index 4f2957a..da952e9 100644 --- a/src/containers/Profile/ProfileInfo.tsx +++ b/src/containers/Profile/ProfileInfo.tsx @@ -94,8 +94,8 @@ const useStyles = makeStyles(theme => ({ const formatDate = (value: Date | string = ''): string => { const date = new Date(value); - const day = ('0' + date.getDate()).slice(-2); - const month = ('0' + date.getMonth()).slice(-2); + const day = (`0${date.getDate()}`).slice(-2); + const month = (`0${date.getMonth()}`).slice(-2); const year = date.getFullYear(); return `${year}-${month}-${day}`; }; |