Skip to content

Commit a4322ac

Browse files
authored
Merge pull request #372 from mosu-dev/feature#371
Feature#371 배너 클릭시 지원하기 페이지로 이동하도록 수정
2 parents d53742f + 5cd3ac8 commit a4322ac

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

mosu-app/src/features/banner/ui/Banner.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { X } from "lucide-react";
22
import Image from "next/image";
3+
import Link from "next/link";
34
import { createPortal } from "react-dom";
45

56
import imgDiscount from "@/features/banner/assets/img-discount.png";
@@ -15,12 +16,13 @@ export const Banner = () => {
1516
isVisible &&
1617
createPortal(
1718
<section className="w-full bg-black" style={{ height: BANNER_HEIGHT }}>
18-
<div
19-
className="relative flex w-full justify-start px-4 md:justify-center"
19+
<Link
20+
className="relative flex w-full justify-start px-4 hover:cursor-pointer md:justify-center"
2021
style={{
2122
height: BANNER_HEIGHT,
2223
background: "linear-gradient(to bottom, #1d1d1d28 0%, #ff1d3828 100%)",
2324
}}
25+
href="/apply"
2426
>
2527
<div className="flex items-center justify-center">
2628
<article>
@@ -41,11 +43,14 @@ export const Banner = () => {
4143
<button
4244
className="absolute right-2 block h-full hover:cursor-pointer md:right-5"
4345
aria-label="배너 닫기"
44-
onClick={hideBanner}
46+
onClick={(e) => {
47+
e.stopPropagation();
48+
hideBanner();
49+
}}
4550
>
4651
<X color="#fff" />
4752
</button>
48-
</div>
53+
</Link>
4954
</section>,
5055
document.getElementById(BANNER_PORTAL_ID) as HTMLElement,
5156
)

0 commit comments

Comments
 (0)