bizbaeja / portfolio

포트폴리오
https://portfolio-bizbaeja.vercel.app
0 stars 0 forks source link

Dark Theme settings #2

Open bizbaeja opened 10 months ago

bizbaeja commented 10 months ago

다운로드

npm install @clerk/themes

twitch/app/layout.tsx ThemeProvider 공급

import { ThemeProvider } from '@/components/theme-provider'

<ClerkProvider appearance={{baseTheme: dark}}>
</ClerkProvider>

다운로드

npm i next-themes

twitch/components/theme-provider.tsx 생성

"use client"

import * as React from "react"
import { ThemeProvider as NextThemesProvider } from "next-themes"
import { type ThemeProviderProps } from "next-themes/dist/types"

export function ThemeProvider({ children, ...props }: ThemeProviderProps) {
  return <NextThemesProvider {...props}>{children}</NextThemesProvider>
}
<body className={inter.className}><ThemeProvider 
        attribute='class'
        forcedTheme='dark'
        storageKey='gamehub-theme'>
        {children}
        </ThemeProvider></body>

//추가