feat: replace Image component with LogoSimple in Header and update Logo component to accept props

This commit is contained in:
arraysid
2025-05-27 04:11:18 +07:00
parent 0a4921f2ef
commit 035f7fa8cd
2 changed files with 6 additions and 10 deletions
@@ -1,9 +1,9 @@
'use client'; 'use client';
import { LogoSimple } from '@/app/_components/logo';
import navigations from '@/data/navigations.json'; import navigations from '@/data/navigations.json';
import { Button } from '@components'; import { Button } from '@components';
import { cn } from '@utils'; import { cn } from '@utils';
import Image from 'next/image';
import Link from 'next/link'; import Link from 'next/link';
import { useRouter } from 'next/navigation'; import { useRouter } from 'next/navigation';
import { useEffect, useState } from 'react'; import { useEffect, useState } from 'react';
@@ -36,13 +36,7 @@ export function Header() {
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<div className="relative overflow-hidden rounded"> <div className="relative overflow-hidden rounded">
<Link href="/"> <Link href="/">
<Image <LogoSimple className="w-[80px]" />
src="/logo.webp"
alt="IMPHNEN"
width={64}
height={64}
className="object-cover"
/>
</Link> </Link>
</div> </div>
</div> </div>
+4 -2
View File
@@ -1,6 +1,7 @@
export function Logo() { export function Logo(props: React.SVGProps<SVGSVGElement>) {
return ( return (
<svg <svg
{...props}
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink" xmlnsXlink="http://www.w3.org/1999/xlink"
width="317" width="317"
@@ -33,9 +34,10 @@ export function Logo() {
); );
} }
export function LogoSimple() { export function LogoSimple(props: React.SVGProps<SVGSVGElement>) {
return ( return (
<svg <svg
{...props}
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink" xmlnsXlink="http://www.w3.org/1999/xlink"
width="138" width="138"