mirror of
https://github.com/karl0ss/homepage.git
synced 2025-04-29 12:03:41 +01:00
Fix: remove date time load delay (#2675)
This commit is contained in:
parent
7f621ed518
commit
a24b5d2fd1
@ -23,6 +23,7 @@ export default function DateTime({ options }) {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const dateFormat = new Intl.DateTimeFormat(dateLocale, { ...format });
|
const dateFormat = new Intl.DateTimeFormat(dateLocale, { ...format });
|
||||||
|
setDate(dateFormat.format(new Date()));
|
||||||
const interval = setInterval(() => {
|
const interval = setInterval(() => {
|
||||||
setDate(dateFormat.format(new Date()));
|
setDate(dateFormat.format(new Date()));
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user