Skip to content

Commit

Permalink
fix: 이미지 import 방식 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
yougyung committed Feb 22, 2024
1 parent 56b05eb commit e3eec71
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
9 changes: 2 additions & 7 deletions app/(sub-page)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Image from 'next/image';
import background from '../../public/assets/background.png';
import NavigationBar from '../ui/view/molecule/navigation-bar';
interface LayoutProps {
children: React.ReactNode;
Expand All @@ -7,13 +8,7 @@ interface LayoutProps {
function Layout({ children }: LayoutProps) {
return (
<>
<Image
src="/assets/background.png"
width={800}
height={288}
className="w-full bg-white h-[18rem]"
alt="background"
/>
<Image src={background} width={800} height={288} className="w-full bg-white h-[18rem]" alt="background" />
<div className="flex justify-center">{children}</div>
</>
);
Expand Down
9 changes: 2 additions & 7 deletions app/ui/view/molecule/navigation-bar.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
import Image from 'next/image';
import logo from '../../../../public/assets/logo.svg';

export default function NavigationBar() {
return (
<div className="absolute p-4 border-b-[1px] w-full">
<Image
className="md:h-10 h-7 w-[110px] md:w-[150px]"
width={150}
height={100}
src="/assets/logo.svg"
alt="main-logo"
/>
<Image className="md:h-10 h-7 w-[110px] md:w-[150px]" width={150} height={100} src={logo} alt="main-logo" />
</div>
);
}

0 comments on commit e3eec71

Please sign in to comment.