Read host name just once

Add an empty dependency array to useEffect(), to go back to the
behaviour since before commit 4bbb291281.

Thanks to @subhoghoshX for spotting!
This commit is contained in:
Martin Pitt 2024-07-12 15:10:15 +02:00
parent b37df688b2
commit c70bd0df07

View file

@ -32,7 +32,7 @@ export const Application = () => {
const hostname = cockpit.file('/etc/hostname');
hostname.watch(content => setHostname(content?.trim() ?? ""));
return hostname.close;
});
}, []);
return (
<Card>