Re-set auto time update in Admin X Settings

refs. https://github.com/TryGhost/Team/issues/3150
This commit is contained in:
Peter Zimon 2023-05-18 13:44:37 +02:00
parent 9285bc2e52
commit c0be5c91f7

View File

@ -13,13 +13,13 @@ const TimeZone: React.FC = () => {
const [currentTime, setCurrentTime] = useState(getLocalTime(publicationTimezone));
useEffect(() => {
setCurrentTime(getLocalTime(publicationTimezone));
// const timer = setInterval(() => {
// }, 1000);
const timer = setInterval(() => {
setCurrentTime(getLocalTime(publicationTimezone));
}, 1000);
// return () => {
// clearInterval(timer);
// };
return () => {
clearInterval(timer);
};
}, [publicationTimezone]);
const buttons = [