mirror of
https://github.com/ichsankurnia/hats-app.git
synced 2026-12-05 10:46:29 +00:00
Use theme-specific dashboard logos
Switch the dashboard logo between light and dark variants based on the active theme, and add the light logo asset.
This commit is contained in:
@@ -4,6 +4,7 @@ import { FC } from 'react';
|
||||
import Link from 'next/link';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { useTheme } from 'next-themes';
|
||||
|
||||
type Props = {
|
||||
className?: string
|
||||
@@ -11,21 +12,13 @@ type Props = {
|
||||
|
||||
const Logo: FC<Props> = ({ className }) => {
|
||||
const router = useRouter()
|
||||
const { theme } = useTheme()
|
||||
|
||||
return (
|
||||
<>
|
||||
{/* <Link href='/' className={cn('inline-flex items-center space-x-3 hover:opacity-70 duration-300', className)} onClick={() => router.refresh()}>
|
||||
<div className='flex justify-center items-center w-10 h-10 rounded cursor-pointer float-left duration-500 hover:rotate-[360deg]'>
|
||||
<img alt='logo' loading='lazy' src='/assets/LOGO_HATs.png' className='h-full w-full' />
|
||||
</div>
|
||||
<div>
|
||||
<h1 className='origin-left font-extrabold duration-300 text-xl'>H.<span className='text-his'>A</span>.T.<span className='text-his'>s</span></h1>
|
||||
<p className='text-[8px] -mt-1 font-medium text-muted-foreground'>HIS Attendance Task System</p>
|
||||
</div>
|
||||
</Link> */}
|
||||
<Link href='/' className={cn('inline-flex items-center space-x-3 hover:opacity-70 duration-300', className)} onClick={() => router.refresh()}>
|
||||
<div className='flex justify-center items-center h-12 max-w-[140px] rounded cursor-pointer float-left duration-500'>
|
||||
<img alt='logo' loading='lazy' src='/assets/LOGO_HIS_HATs_NI.png' className='h-full w-full' />
|
||||
<div className='flex justify-center items-center h-12 max-w-35 rounded cursor-pointer float-left duration-500'>
|
||||
<img alt='logo' loading='lazy' src={theme === 'light' ? '/assets/LOGO_HIS_HATs_LIGHT.png' : '/assets/LOGO_HIS_HATs_NI.png'} className='h-full w-full' />
|
||||
</div>
|
||||
</Link>
|
||||
</>
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 318 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 316 KiB After Width: | Height: | Size: 74 KiB |
Reference in New Issue
Block a user