import style from "./style.module.css"; import { useState, useEffect } from "react"; export default function Datetime() { const locale = "de"; const [today, setDate] = useState(new Date()); useEffect(() => { const timer = setInterval(() => { setDate(new Date()); }, 20 * 1000); return () => { clearInterval(timer); }; }, []); const date = today.toLocaleDateString(locale, { month: "long", day: "numeric", year: "numeric", }); const time = today.toLocaleTimeString(locale, { hour: "numeric", hour12: false, minute: "numeric", }); return (