-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add clock on daily standup - Use human friendly date format on monthly calendar - Better UX for the availability dialog - Show disabled options instead of no option - Only show availability of un-available users
- Loading branch information
Showing
11 changed files
with
164 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import { | ||
useEffect, | ||
useState, | ||
} from 'react'; | ||
|
||
const dateTimeFormatter = new Intl.DateTimeFormat( | ||
[], | ||
{ | ||
year: 'numeric', | ||
month: 'short', | ||
day: 'numeric', | ||
weekday: 'short', | ||
hour: 'numeric', | ||
minute: 'numeric', | ||
// second: 'numeric', | ||
hour12: true, | ||
}, | ||
); | ||
|
||
function formatTime(date: Date) { | ||
return dateTimeFormatter.format(date); | ||
} | ||
|
||
function Clock() { | ||
const [dateStr, setDateStr] = useState(() => { | ||
const date = new Date(); | ||
return formatTime(date); | ||
}); | ||
useEffect( | ||
() => { | ||
const timeout = window.setInterval( | ||
() => { | ||
const date = new Date(); | ||
const dateAsString = formatTime(date); | ||
setDateStr(dateAsString); | ||
}, | ||
500, | ||
); | ||
return () => { | ||
window.clearInterval(timeout); | ||
}; | ||
}, | ||
[], | ||
); | ||
return ( | ||
<div> | ||
{dateStr} | ||
</div> | ||
); | ||
} | ||
|
||
export default Clock; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
} | ||
|
||
.days { | ||
width: 5rem; | ||
width: 6rem; | ||
color: var(--color-text-light); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.