diff --git a/components/Logout.tsx b/components/Logout.tsx index d8ec1d6e..e0333c32 100644 --- a/components/Logout.tsx +++ b/components/Logout.tsx @@ -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 = '/'; }