'use client' import React, { Fragment, useEffect, useState } from 'react' import Link from 'next/link' import { useAuth } from '../../_providers/Auth' export const LogoutPage: React.FC = (props) => { const { logout } = useAuth() const [success, setSuccess] = useState('') const [error, setError] = useState('') useEffect(() => { const performLogout = async () => { try { await logout() setSuccess('Logged out successfully.') } catch (_) { setError('You are already logged out.') } } performLogout() }, [logout]) return ( {(error || success) && (

{error || success}

{'What would you like to do next? '} Click here {` to go to the home page. To log back in, `} click here {'.'}

)}
) }