-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: get logout page working again #50
Conversation
Website preview 🔗✨ |
import { useRouter } from "next/navigation" | ||
import { useEffect } from "react" | ||
|
||
export default function LogoutPage () { | ||
//const [, { unloadAgent }] = useW3() | ||
const [, { logout }] = useW3() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not a client method? I assume we'd want this in w3cli also?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
implementing logout in the client would probably help simplify this method:
https://github.com/web3-storage/w3ui/blob/main/packages/react/src/providers/Provider.tsx#L76
but I think we'd still need something at this level because we need to clear the client, space, and accounts state
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could probably use the same event trick to clear space and accounts, but afaict Client
isn't really meant to be mutable, and the creating a new private key is something that happens during Client
creation, so we really do need something that can throw away the old client and create a new one, which I don't think can happen inside a Client
method
🤖 I have created a release *beep* *boop* --- ## [1.1.0](w3console-v1.0.0...w3console-v1.1.0) (2023-12-01) ### Features * extract usePlan and use it to chill our plan/get game ([#51](#51)) ([51c51aa](51c51aa)) ### Bug Fixes * get logout page working again ([#50](#50)) ([eb2a3aa](eb2a3aa)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This will work once storacha/w3ui#595 is released.