Skip to content

Commit

Permalink
wip: get logout page working again
Browse files Browse the repository at this point in the history
  • Loading branch information
travis committed Nov 30, 2023
1 parent d70c914 commit c6e5513
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/app/logout/page.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
'use client'
//import { useW3 } from "@w3ui/react"
import { useW3 } from "@w3ui/react"
import { useRouter } from "next/navigation"
import { useEffect } from "react"

export default function LogoutPage () {
//const [, { unloadAgent }] = useW3()
const [, { logout }] = useW3()

function unloadAgent(){
// TODO need to figure out how this will work with the new library
}
const router = useRouter()
useEffect(function () {
if (unloadAgent) {
if (logout) {
async function logOutAndRedirect () {
await unloadAgent()
await logout()
router.push('/')
}
logOutAndRedirect()
Expand Down

0 comments on commit c6e5513

Please sign in to comment.