client/web: start using swr for some fetching
Adds swr to the web client, and starts by using it from the useNodeData hook. Updates #10261 Signed-off-by: Sonia Appasamy <sonia@tailscale.com>
This commit is contained in:

committed by
Sonia Appasamy

parent
014ae98297
commit
95655405b8
@ -146,8 +146,7 @@ type TailscaleUpOptions = {
|
||||
}
|
||||
|
||||
function tailscaleUp(options: TailscaleUpOptions) {
|
||||
return apiFetch("/up", "POST", options)
|
||||
.then((r) => r.json())
|
||||
return apiFetch<{ url?: string }>("/up", "POST", options)
|
||||
.then((d) => {
|
||||
d.url && window.open(d.url, "_blank")
|
||||
})
|
||||
|
Reference in New Issue
Block a user