Skip to content

Commit

Permalink
Refactor layout.tsx: Remove useAuth, replace ResetHUDButton with Clie…
Browse files Browse the repository at this point in the history
…ntResetHUDButton.
  • Loading branch information
AtlantisPleb committed Aug 29, 2024
1 parent 3403d39 commit 6b37cad
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import type { Metadata } from "next"
import { jetbrainsMono } from '@/lib/fonts'
import "./globals.css"
import { siteConfig } from "./siteConfig"
import ResetHUDButton from "@/components/ResetHUDButton"
import { ClerkProvider, useAuth } from "@clerk/nextjs"
import { ClerkProvider } from "@clerk/nextjs"
import ClientResetHUDButton from "@/components/ClientResetHUDButton"

export const metadata: Metadata = {
metadataBase: new URL("https://openagents.com"),
Expand All @@ -30,11 +30,6 @@ export const metadata: Metadata = {
},
}

function AuthenticatedResetHUDButton() {
const { isSignedIn } = useAuth()
return <ResetHUDButton isSignedIn={isSignedIn || false} />
}

export default function RootLayout({
children,
}: Readonly<{
Expand All @@ -47,7 +42,7 @@ export default function RootLayout({
className={`${jetbrainsMono.variable} min-h-screen scroll-auto antialiased selection:bg-white selection:text-black dark:bg-black font-mono`}
>
<div className="fixed top-4 right-4 z-50">
<AuthenticatedResetHUDButton />
<ClientResetHUDButton />
</div>
{children}
</body>
Expand Down

0 comments on commit 6b37cad

Please sign in to comment.