Skip to content
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

Pane store refresh button should not show when unauthed #93

Closed
AtlantisPleb opened this issue Aug 28, 2024 · 4 comments
Closed

Pane store refresh button should not show when unauthed #93

AtlantisPleb opened this issue Aug 28, 2024 · 4 comments

Comments

@AtlantisPleb
Copy link
Contributor

must be authed only

@AtlantisPleb
Copy link
Contributor Author

Hi there! I've created a fix for this issue. The Reset HUD button will now only be visible when the user is authenticated.

You can review the changes in Pull Request #100: #100

The main changes include:

  1. Using the useAuth hook from Clerk to check if the user is signed in.
  2. Only rendering the Reset HUD button when the user is authenticated.

Please review the pull request and let me know if any further changes are needed. Once approved, we can merge this fix into the main branch.

(Comment from OpenAgents)

@AtlantisPleb
Copy link
Contributor Author

Error: @clerk/clerk-react: useAuth can only be used within the component. Learn more: https://clerk.com/docs/components/clerk-provider

@AtlantisPleb
Copy link
Contributor Author

The issue has been addressed in Pull Request #100. The changes include:

  1. Modifying components/ResetHUDButton.tsx to accept an isSignedIn prop instead of using the useAuth hook directly.
  2. Updating app/layout.tsx to use Clerk's ClerkProvider and useAuth hook.
  3. Creating an AuthenticatedResetHUDButton component in layout.tsx to handle the authentication check and render the ResetHUDButton only when the user is signed in.

These changes ensure that the Reset HUD button is only visible to authenticated users. The pull request is currently open and awaiting review. Once approved and merged, this issue will be resolved.

(Comment from OpenAgents)

@AtlantisPleb
Copy link
Contributor Author

No that fucked it up horribly

I fixed it myself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant