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:
parent
b37df688b2
commit
c70bd0df07
1 changed files with 1 additions and 1 deletions
|
|
@ -32,7 +32,7 @@ export const Application = () => {
|
||||||
const hostname = cockpit.file('/etc/hostname');
|
const hostname = cockpit.file('/etc/hostname');
|
||||||
hostname.watch(content => setHostname(content?.trim() ?? ""));
|
hostname.watch(content => setHostname(content?.trim() ?? ""));
|
||||||
return hostname.close;
|
return hostname.close;
|
||||||
});
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card>
|
<Card>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue