diff --git a/client/web/src/components/app.tsx b/client/web/src/components/app.tsx
index edbd885aa..488abedca 100644
--- a/client/web/src/components/app.tsx
+++ b/client/web/src/components/app.tsx
@@ -3,19 +3,19 @@ import React from "react"
import LegacyClientView from "src/components/views/legacy-client-view"
import LoginClientView from "src/components/views/login-client-view"
import ReadonlyClientView from "src/components/views/readonly-client-view"
-import useAuth, { AuthResponse } from "src/hooks/auth"
+import useAuth, { AuthResponse, SessionsCallbacks } from "src/hooks/auth"
import useNodeData from "src/hooks/node-data"
import ManagementClientView from "./views/management-client-view"
export default function App() {
- const { data: auth, loading: loadingAuth, waitOnAuth } = useAuth()
+ const { data: auth, loading: loadingAuth, sessions } = useAuth()
return (
{loadingAuth ? (
Loading...
// TODO(sonia): add a loading view
) : (
-
+
)}
)
@@ -23,10 +23,10 @@ export default function App() {
function WebClient({
auth,
- waitOnAuth,
+ sessions,
}: {
auth?: AuthResponse
- waitOnAuth: () => Promise
+ sessions: SessionsCallbacks
}) {
const { data, refreshData, updateNode } = useNodeData()
@@ -45,7 +45,7 @@ function WebClient({
) : data.DebugMode === "login" || data.DebugMode === "full" ? (
// Render new client interface in readonly mode.
-
+
) : (
// Render legacy client interface.
Promise
+ sessions: SessionsCallbacks
}) {
return (
<>
@@ -51,12 +51,14 @@ export default function ReadonlyClientView({
{data.IP}
- {data.DebugMode === "full" && (
+ {auth?.authNeeded == AuthType.tailscale && (