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)
fetch(`http://${node.IPv4}:5252/ok`, { mode: "no-cors" })
.then((r) => {
if (r.ok) {
.then(() => {
setCanConnectOverTS(true)
}
setIsRunningCheck(false)
})
.catch(() => setIsRunningCheck(false))

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

Loading…
Cancel
Save