Skip to content

Commit

Permalink
Refactor ClientResetHUDButton to use ClerkProvider, rename inner comp…
Browse files Browse the repository at this point in the history
…onent to AuthenticatedResetHUDButton for clarity.
  • Loading branch information
AtlantisPleb committed Aug 29, 2024
1 parent 619fbea commit 08c3efe
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions components/ClientResetHUDButton.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
"use client";

import React from 'react';
import { useAuth } from "@clerk/nextjs";
import { useAuth, ClerkProvider } from "@clerk/nextjs";
import ResetHUDButton from "./ResetHUDButton";

const ClientResetHUDButton: React.FC = () => {
const AuthenticatedResetHUDButton: React.FC = () => {
const { isSignedIn } = useAuth();

if (!isSignedIn) {
Expand All @@ -14,4 +14,12 @@ const ClientResetHUDButton: React.FC = () => {
return <ResetHUDButton />;
};

const ClientResetHUDButton: React.FC = () => {
return (
<ClerkProvider>
<AuthenticatedResetHUDButton />
</ClerkProvider>
);
};

export default ClientResetHUDButton;

0 comments on commit 08c3efe

Please sign in to comment.