Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions public/images/logo-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions src/app/features/auth/components/AuthLogo.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
'use client'

import Image from 'next/image'
import Link from 'next/link'
import { useTheme } from 'next-themes'

interface AuthLogoProps {
text: string
}

export default function AuthLogo({ text }: AuthLogoProps): JSX.Element {
const { resolvedTheme } = useTheme()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

next-themes의 useTheme 훅으로 resolvedTheme 문자열을 가져올 수 있군용!!


const isDark = resolvedTheme === 'dark'

return (
<div className="flex w-[230px] flex-col items-center justify-center gap-12">
<Link className="relative block h-[250px] w-full" href="/">
<Image
src={isDark ? '/images/logo-dark.svg' : '/images/logo-light.svg'}
alt="CoPlan 로고"
className="object-contain"
fill
priority
/>
</Link>
<span className="Text-black text-xl">{text}</span>
</div>
)
}
Loading