client/web: fix ts connection check

Updates #10261

Signed-off-by: Sonia Appasamy <sonia@tailscale.com>
pull/10569/head
Sonia Appasamy 12 months ago committed by Sonia Appasamy
parent 8c2fcef453
commit dd0279a6c9

@ -106,10 +106,8 @@ function LoginPopoverContent({
} }
setIsRunningCheck(true) setIsRunningCheck(true)
fetch(`http://${node.IPv4}:5252/ok`, { mode: "no-cors" }) fetch(`http://${node.IPv4}:5252/ok`, { mode: "no-cors" })
.then((r) => { .then(() => {
if (r.ok) { setCanConnectOverTS(true)
setCanConnectOverTS(true)
}
setIsRunningCheck(false) setIsRunningCheck(false)
}) })
.catch(() => setIsRunningCheck(false)) .catch(() => setIsRunningCheck(false))

@ -83,7 +83,8 @@ export default function useAuth() {
useEffect(() => { useEffect(() => {
loadAuth() // Refresh auth state after syno auth runs loadAuth() // Refresh auth state after syno auth runs
}, [loadAuth, ranSynoAuth]) // eslint-disable-next-line react-hooks/exhaustive-deps
}, [ranSynoAuth])
return { return {
data, data,

Loading…
Cancel
Save