Skip to content

Commit

Permalink
CCM-5100: Use auth/signOut to avoid needing useAuthenticator hook
Browse files Browse the repository at this point in the history
  • Loading branch information
m-houston committed Jul 3, 2024
1 parent 44a6ae3 commit 368d73e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions components/Logout.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
'use client';

import { useAuthenticator } from '@aws-amplify/ui-react';
import { Button } from 'nhsuk-react-components';
import { signOut } from '@aws-amplify/auth';

export default function Logout() {
const { authStatus, signOut } = useAuthenticator();

async function handleSignOut() {
signOut();
await signOut();
location.href = '/';
}

Expand Down

0 comments on commit 368d73e

Please sign in to comment.