From 874ca57eb4a4689a51b4d0f09cbdd4d6fde60d91 Mon Sep 17 00:00:00 2001 From: Chris Burr Date: Mon, 9 Oct 2023 18:07:39 +0200 Subject: [PATCH] Fix login button --- src/components/ui/LoginButton.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/ui/LoginButton.tsx b/src/components/ui/LoginButton.tsx index 443f758e..4af5ffc7 100644 --- a/src/components/ui/LoginButton.tsx +++ b/src/components/ui/LoginButton.tsx @@ -21,7 +21,7 @@ import React from "react"; */ export function LoginButton() { const { accessTokenPayload } = useOidcAccessToken(); - const { logout, isAuthenticated } = useOidc(); + const { login, logout, isAuthenticated } = useOidc(); const [anchorEl, setAnchorEl] = React.useState(null); const open = Boolean(anchorEl); @@ -43,8 +43,7 @@ export function LoginButton() { "&:hover": { bgcolor: deepOrange[500] }, }} variant="contained" - component={NextLink} - href="/dashboard" + onClick={() => login()} > Login