import React, { useState } from 'react'; import { useWdkDependenciesEffect, WdkDependencies } from '@veupathdb/wdk-client/lib/Hooks/WdkDependenciesEffect'; import { makeClassNameHelper } from '@veupathdb/wdk-client/lib/Utils/ComponentUtils'; import { alert } from '@veupathdb/wdk-client/lib/Utils/Platform'; import './ResetSession.scss'; const cx = makeClassNameHelper('ebrc-ResetSession') export function ResetSession() { const [ confirmed, setConfirmed ] = useState(false); const [ isResetSessionClicked, setIsResetSessionClicked ] = useState(false); useWdkDependenciesEffect(wdkDependencies => { (async function() { if (isResetSessionClicked) { await resetSession(wdkDependencies); await alert('Your session has been reset', 'You will now be redirected to the home page.'); window.location.href = '/'; } })(); }, [ isResetSessionClicked ]); return (
Clicking the following button will remove all cookies related to this website and redirect you to the homepage.
This means the following things will happen: