Fix: remove date time load delay (#2675)

This commit is contained in:
Luke Hagar 2024-01-18 16:58:42 -06:00 committed by GitHub
parent 7f621ed518
commit a24b5d2fd1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -23,6 +23,7 @@ export default function DateTime({ options }) {
useEffect(() => {
const dateFormat = new Intl.DateTimeFormat(dateLocale, { ...format });
setDate(dateFormat.format(new Date()));
const interval = setInterval(() => {
setDate(dateFormat.format(new Date()));
}, 1000);