From de2af54ffcf22e995c9e09f32a7ef14c6906a5ac Mon Sep 17 00:00:00 2001 From: Sonia Appasamy Date: Tue, 7 Nov 2023 10:55:55 -0500 Subject: [PATCH] client/web: pipe newSession through to readonly view Updates tailscale/corp#14335 Signed-off-by: Sonia Appasamy --- client/web/src/components/app.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/client/web/src/components/app.tsx b/client/web/src/components/app.tsx index 29869d17a..5665ac19f 100644 --- a/client/web/src/components/app.tsx +++ b/client/web/src/components/app.tsx @@ -4,7 +4,7 @@ import LegacyClientView from "src/components/views/legacy-client-view" import LoginClientView from "src/components/views/login-client-view" import ManagementClientView from "src/components/views/management-client-view" import ReadonlyClientView from "src/components/views/readonly-client-view" -import useAuth, { AuthResponse, SessionsCallbacks } from "src/hooks/auth" +import useAuth, { AuthResponse } from "src/hooks/auth" import useNodeData, { NodeData, NodeUpdate } from "src/hooks/node-data" import { ReactComponent as TailscaleIcon } from "src/icons/tailscale-icon.svg" import ProfilePic from "src/ui/profile-pic" @@ -12,7 +12,7 @@ import { Link, Route, Switch, useLocation } from "wouter" import DeviceDetailsView from "./views/device-details-view" export default function App() { - const { data: auth, loading: loadingAuth, sessions } = useAuth() + const { data: auth, loading: loadingAuth, newSession } = useAuth() const { data, refreshData, updateNode } = useNodeData() useEffect(() => { refreshData() @@ -32,7 +32,7 @@ export default function App() { @@ -60,13 +60,13 @@ export default function App() { function HomeView({ auth, data, - sessions, + newSession, refreshData, updateNode, }: { auth?: AuthResponse data: NodeData - sessions: SessionsCallbacks + newSession: () => Promise refreshData: () => Promise updateNode: (update: NodeUpdate) => void }) { @@ -83,7 +83,7 @@ function HomeView({ ) : data.DebugMode === "login" || data.DebugMode === "full" ? ( // Render new client interface in readonly mode. - + ) : ( // Render legacy client interface.