From a370bcbaa4ad53d6397b5973efa2b118e9fa8236 Mon Sep 17 00:00:00 2001 From: Universe Date: Tue, 25 Feb 2025 15:59:49 +0900 Subject: [PATCH 01/10] mv --- editor/app/(demo)/demo/sales/{startpage => campaign}/000/page.tsx | 0 editor/app/(demo)/demo/sales/{startpage => campaign}/001/page.tsx | 0 editor/app/(demo)/demo/sales/{startpage => campaign}/002/page.tsx | 0 editor/app/(demo)/demo/sales/{startpage => campaign}/003/page.tsx | 0 editor/app/(demo)/demo/sales/{startpage => campaign}/004/page.tsx | 0 editor/app/(demo)/demo/sales/{startpage => campaign}/005/page.tsx | 0 editor/app/(demo)/demo/sales/{startpage => campaign}/006/page.tsx | 0 editor/app/(demo)/demo/sales/{startpage => campaign}/page.tsx | 0 8 files changed, 0 insertions(+), 0 deletions(-) rename editor/app/(demo)/demo/sales/{startpage => campaign}/000/page.tsx (100%) rename editor/app/(demo)/demo/sales/{startpage => campaign}/001/page.tsx (100%) rename editor/app/(demo)/demo/sales/{startpage => campaign}/002/page.tsx (100%) rename editor/app/(demo)/demo/sales/{startpage => campaign}/003/page.tsx (100%) rename editor/app/(demo)/demo/sales/{startpage => campaign}/004/page.tsx (100%) rename editor/app/(demo)/demo/sales/{startpage => campaign}/005/page.tsx (100%) rename editor/app/(demo)/demo/sales/{startpage => campaign}/006/page.tsx (100%) rename editor/app/(demo)/demo/sales/{startpage => campaign}/page.tsx (100%) diff --git a/editor/app/(demo)/demo/sales/startpage/000/page.tsx b/editor/app/(demo)/demo/sales/campaign/000/page.tsx similarity index 100% rename from editor/app/(demo)/demo/sales/startpage/000/page.tsx rename to editor/app/(demo)/demo/sales/campaign/000/page.tsx diff --git a/editor/app/(demo)/demo/sales/startpage/001/page.tsx b/editor/app/(demo)/demo/sales/campaign/001/page.tsx similarity index 100% rename from editor/app/(demo)/demo/sales/startpage/001/page.tsx rename to editor/app/(demo)/demo/sales/campaign/001/page.tsx diff --git a/editor/app/(demo)/demo/sales/startpage/002/page.tsx b/editor/app/(demo)/demo/sales/campaign/002/page.tsx similarity index 100% rename from editor/app/(demo)/demo/sales/startpage/002/page.tsx rename to editor/app/(demo)/demo/sales/campaign/002/page.tsx diff --git a/editor/app/(demo)/demo/sales/startpage/003/page.tsx b/editor/app/(demo)/demo/sales/campaign/003/page.tsx similarity index 100% rename from editor/app/(demo)/demo/sales/startpage/003/page.tsx rename to editor/app/(demo)/demo/sales/campaign/003/page.tsx diff --git a/editor/app/(demo)/demo/sales/startpage/004/page.tsx b/editor/app/(demo)/demo/sales/campaign/004/page.tsx similarity index 100% rename from editor/app/(demo)/demo/sales/startpage/004/page.tsx rename to editor/app/(demo)/demo/sales/campaign/004/page.tsx diff --git a/editor/app/(demo)/demo/sales/startpage/005/page.tsx b/editor/app/(demo)/demo/sales/campaign/005/page.tsx similarity index 100% rename from editor/app/(demo)/demo/sales/startpage/005/page.tsx rename to editor/app/(demo)/demo/sales/campaign/005/page.tsx diff --git a/editor/app/(demo)/demo/sales/startpage/006/page.tsx b/editor/app/(demo)/demo/sales/campaign/006/page.tsx similarity index 100% rename from editor/app/(demo)/demo/sales/startpage/006/page.tsx rename to editor/app/(demo)/demo/sales/campaign/006/page.tsx diff --git a/editor/app/(demo)/demo/sales/startpage/page.tsx b/editor/app/(demo)/demo/sales/campaign/page.tsx similarity index 100% rename from editor/app/(demo)/demo/sales/startpage/page.tsx rename to editor/app/(demo)/demo/sales/campaign/page.tsx From 703df6ef4a8c37d92637c58987ff527652f72389 Mon Sep 17 00:00:00 2001 From: Universe Date: Tue, 25 Feb 2025 15:59:56 +0900 Subject: [PATCH 02/10] add static demo route --- .../polestar-kr-2503/[cid]/invite/page.tsx | 194 ++++++++++++++++++ .../polestar-kr-2503/[cid]/join/page.tsx | 7 + .../campaign/polestar-kr-2503/portal/page.tsx | 7 + 3 files changed, 208 insertions(+) create mode 100644 editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/invite/page.tsx create mode 100644 editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/join/page.tsx create mode 100644 editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/portal/page.tsx diff --git a/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/invite/page.tsx b/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/invite/page.tsx new file mode 100644 index 000000000..5bd7c5052 --- /dev/null +++ b/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/invite/page.tsx @@ -0,0 +1,194 @@ +"use client"; + +import React from "react"; +import { Card } from "@/components/ui/card"; +import { Button } from "@/components/ui/button"; +import { useTimer } from "react-timer-hook"; +import { notFound } from "next/navigation"; + +type CampaignData = { + cid: string; + user: { + name: string; + }; +}; + +const cids = [ + { + cid: "00000000", + user: { + name: "김철수", + }, + }, + { + cid: "00000001", + user: { + name: "홍길동", + }, + }, + { + cid: "00000002", + user: { + name: "박영희", + }, + }, + { + cid: "00000003", + user: { + name: "이영희", + }, + }, + { + cid: "00000004", + user: { + name: "김영희", + }, + }, + { + cid: "00000005", + user: { + name: "최영희", + }, + }, +]; + +const mkshare = (d: CampaignData) => { + return { + title: "Polestar 2", + text: `${d.user.name}님의 Polestar 2 시승 초대 이벤트`, + // url: `https://demo.grida.co/${d.cid}`, + url: `http://localhost:3000/demo/sales/polestar-kr-2503/${d.cid}/join`, + }; +}; + +export default function PolestarPromo({ + params, +}: { + params: { + cid: string; + }; +}) { + const d = cids.find((c) => c.cid === params.cid); + if (!d) { + return notFound(); + } + + const onshareclick = () => { + if (!navigator.share) return; + navigator + .share(mkshare(d)) + .then(() => { + alert("Thanks for sharing!"); + }) + .catch(() => { + alert("cancel sharing"); + }); + }; + + return ( +
+ {/* Header */} +
+

Polestar

+
+ + {/* Hero Section */} +
+ {/* eslint-disable-next-line @next/next/no-img-element */} + Polestar 4 +
+

Polestar 4

+

시승 초대하고 경품을 받아보세요

+
+
+ + {/* Countdown Timer */} +
+ +
+ + {/* Stats Grid */} + +
+

1명

+

Polestar 4

+
+
+

30명

+

iPad Air 11

+
+
+

100%

+

스타벅스 아메리카노

+
+
+ + {/* Info Section */} +
+

+ + + 시승 초대를 한 고객과, 초대 링크를 통해 시승 신청을 한 고객 모두에게 + 경품을 드립니다. + +

+

+ + + 링크는 횟수와 무관하게 공유 가능하되, 선착순 10명이 신청 완료 할 + 경우 해당 링크는 더 이상 사용할 수 없게 됩니다. + +

+

+ + 1인 당 1회만 신청이 복가합니다. +

+
+ + {/* CTA Button */} +
+ +
+
+ ); +} + +function getNextKSTMidnight() { + const now = new Date(); + const nowKST = new Date( + now.toLocaleString("en-US", { timeZone: "Asia/Seoul" }) + ); + const nextMidnightKST = new Date(nowKST); + nextMidnightKST.setDate(nowKST.getDate() + 1); + nextMidnightKST.setHours(0, 0, 0, 0); + const diff = nextMidnightKST.getTime() - nowKST.getTime(); + return new Date(now.getTime() + diff); +} + +function Timer() { + const expiryTimestamp = getNextKSTMidnight(); + const { hours, minutes, seconds } = useTimer({ + expiryTimestamp, + onExpire: () => console.warn("Timer expired"), + }); + + return ( +
+
+
+ {hours}h : {minutes}m : {seconds}s +
+
+
+ ); +} diff --git a/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/join/page.tsx b/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/join/page.tsx new file mode 100644 index 000000000..93042df97 --- /dev/null +++ b/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/join/page.tsx @@ -0,0 +1,7 @@ +"use client"; +import { Button } from "@/components/ui/button"; +import React from "react"; + +export default function BPage() { + return
; +} diff --git a/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/portal/page.tsx b/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/portal/page.tsx new file mode 100644 index 000000000..93042df97 --- /dev/null +++ b/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/portal/page.tsx @@ -0,0 +1,7 @@ +"use client"; +import { Button } from "@/components/ui/button"; +import React from "react"; + +export default function BPage() { + return
; +} From d686d4acb364bcd6f968ff8098eb0dc7f8a1402c Mon Sep 17 00:00:00 2001 From: Universe Date: Tue, 25 Feb 2025 16:44:34 +0900 Subject: [PATCH 03/10] wip --- .../polestar-kr-2503/[cid]/invite/page.tsx | 236 +++++++----------- .../polestar-kr-2503/[cid]/join/page.tsx | 169 ++++++++++++- .../sales/campaign/polestar-kr-2503/data.ts | 45 ++++ .../campaign/polestar-kr-2503/portal/page.tsx | 115 ++++++++- .../sales/campaign/polestar-kr-2503/timer.tsx | 32 +++ 5 files changed, 443 insertions(+), 154 deletions(-) create mode 100644 editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/data.ts create mode 100644 editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/timer.tsx diff --git a/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/invite/page.tsx b/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/invite/page.tsx index 5bd7c5052..dbe5aa7a0 100644 --- a/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/invite/page.tsx +++ b/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/invite/page.tsx @@ -3,61 +3,23 @@ import React from "react"; import { Card } from "@/components/ui/card"; import { Button } from "@/components/ui/button"; -import { useTimer } from "react-timer-hook"; import { notFound } from "next/navigation"; - -type CampaignData = { - cid: string; - user: { - name: string; - }; -}; - -const cids = [ - { - cid: "00000000", - user: { - name: "김철수", - }, - }, - { - cid: "00000001", - user: { - name: "홍길동", - }, - }, - { - cid: "00000002", - user: { - name: "박영희", - }, - }, - { - cid: "00000003", - user: { - name: "이영희", - }, - }, - { - cid: "00000004", - user: { - name: "김영희", - }, - }, - { - cid: "00000005", - user: { - name: "최영희", - }, - }, -]; +import { + ScreenMobileFrame, + ScreenRoot, + ScreenScrollable, + ScreenWindowRoot, + Timer, +} from "@/theme/templates/kit/components"; +import { CampaignData, mock } from "../../data"; +import { CountdownTimer } from "../../timer"; const mkshare = (d: CampaignData) => { return { title: "Polestar 2", text: `${d.user.name}님의 Polestar 2 시승 초대 이벤트`, // url: `https://demo.grida.co/${d.cid}`, - url: `http://localhost:3000/demo/sales/polestar-kr-2503/${d.cid}/join`, + url: `http://localhost:3000/demo/sales/campaign/polestar-kr-2503/${d.cid}/join`, }; }; @@ -68,7 +30,7 @@ export default function PolestarPromo({ cid: string; }; }) { - const d = cids.find((c) => c.cid === params.cid); + const d = mock.find((c) => c.cid === params.cid); if (!d) { return notFound(); } @@ -86,109 +48,87 @@ export default function PolestarPromo({ }; return ( -
- {/* Header */} -
-

Polestar

-
- - {/* Hero Section */} -
- {/* eslint-disable-next-line @next/next/no-img-element */} - Polestar 4 -
-

Polestar 4

-

시승 초대하고 경품을 받아보세요

-
-
- - {/* Countdown Timer */} -
- -
+ + + + + {/* Header */} +
+

Polestar

+
- {/* Stats Grid */} - -
-

1명

-

Polestar 4

-
-
-

30명

-

iPad Air 11

-
-
-

100%

-

스타벅스 아메리카노

-
-
+ {/* Hero Section */} +
+ {/* eslint-disable-next-line @next/next/no-img-element */} + Polestar 4 +
+

Polestar 4

+

+ 시승 초대하고 경품을 받아보세요 +

+
+
- {/* Info Section */} -
-

- - - 시승 초대를 한 고객과, 초대 링크를 통해 시승 신청을 한 고객 모두에게 - 경품을 드립니다. - -

-

- - - 링크는 횟수와 무관하게 공유 가능하되, 선착순 10명이 신청 완료 할 - 경우 해당 링크는 더 이상 사용할 수 없게 됩니다. - -

-

- - 1인 당 1회만 신청이 복가합니다. -

-
+ {/* Countdown Timer */} +
+ +
- {/* CTA Button */} -
- -
-
- ); -} - -function getNextKSTMidnight() { - const now = new Date(); - const nowKST = new Date( - now.toLocaleString("en-US", { timeZone: "Asia/Seoul" }) - ); - const nextMidnightKST = new Date(nowKST); - nextMidnightKST.setDate(nowKST.getDate() + 1); - nextMidnightKST.setHours(0, 0, 0, 0); - const diff = nextMidnightKST.getTime() - nowKST.getTime(); - return new Date(now.getTime() + diff); -} + {/* Stats Grid */} + +
+

1명

+

Polestar 4

+
+
+

30명

+

iPad Air 11

+
+
+

100%

+

스타벅스 아메리카노

+
+
-function Timer() { - const expiryTimestamp = getNextKSTMidnight(); - const { hours, minutes, seconds } = useTimer({ - expiryTimestamp, - onExpire: () => console.warn("Timer expired"), - }); + {/* Info Section */} +
+

+ + + 시승 초대를 한 고객과, 초대 링크를 통해 시승 신청을 한 고객 + 모두에게 경품을 드립니다. + +

+

+ + + 링크는 횟수와 무관하게 공유 가능하되, 선착순 10명이 신청 완료 + 할 경우 해당 링크는 더 이상 사용할 수 없게 됩니다. + +

+

+ + 1인 당 1회만 신청이 복가합니다. +

+
- return ( -
-
-
- {hours}h : {minutes}m : {seconds}s -
-
-
+ {/* CTA Button */} +
+ +
+ + + + ); } diff --git a/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/join/page.tsx b/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/join/page.tsx index 93042df97..1d026bb18 100644 --- a/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/join/page.tsx +++ b/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/join/page.tsx @@ -1,7 +1,170 @@ "use client"; -import { Button } from "@/components/ui/button"; import React from "react"; +import { Button } from "@/components/ui/button"; +import { + ScreenBackground, + ScreenMobileFrame, + ScreenRoot, + ScreenScrollable, + ScreenWindowRoot, +} from "@/theme/templates/kit/components"; +import { CampaignData, mock } from "../../data"; +import { notFound } from "next/navigation"; +import { ArrowRight } from "lucide-react"; +import { CountdownTimer } from "../../timer"; +import { Card } from "@/components/ui/card"; + +const EXT_FORM_LINK = + "https://www.polestar.com/kr/test-drive/booking/ps4/at-polestar"; + +export default function BPage({ + params, +}: { + params: { + cid: string; + }; +}) { + const [stage, setStage] = React.useState(0); + + const d = mock.find((c) => c.cid === params.cid); + if (!d) { + return notFound(); + } + + return ( + + + + + {stage === 0 && setStage(1)} />} + {stage === 1 &&
} + + + + + ); +} + +function Hero({ data, onNext }: { data: CampaignData; onNext?: () => void }) { + return ( +
+ {/* Background Image */} + + {/* eslint-disable-next-line @next/next/no-img-element */} + Polestar 4 + + + {/* Content Overlay */} +
+
+ {/* Logo */} +

Polestar

+ + {/* Hero Content */} +
+

+ {data.user.name}님이 추천하는 Polestar 4 +

+

+ 혁신적 디자인의 전기 퍼포먼스 SUV 쿠페 +

+

+ 지금 시승 신청하고 100% 당첨 경품을 받아보세요 +

+ + +
+
+
+
+ ); +} + +function Main() { + return ( +
+ {/* Header */} +
+

Polestar

+
+ + {/* Hero Section */} +
+ {/* eslint-disable-next-line @next/next/no-img-element */} + Polestar 4 +
+

Polestar 4

+

시승 초대하고 경품을 받아보세요

+
+
+ + {/* Countdown Timer */} +
+ +
+ + {/* Stats Grid */} + +
+

1명

+

Polestar 4

+
+
+

30명

+

iPad Air 11

+
+
+

100%

+

스타벅스 아메리카노

+
+
+ + {/* Info Section */} +
+

+ + 1인 당 중복 신청은 불가합니다. +

+

+ + + 시승 초대를 한 고객과, 초대 링크를 통해 시승 신청을 한 고객 모두에게 + 경품을 드립니다. + +

+

+ + 무료 시승입니다. +

+

+ + 시승 전 약 15분의 차량 설명 시간이 있습니다. +

+
-export default function BPage() { - return
; + {/* CTA Button */} +
+ +
+
+ ); } diff --git a/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/data.ts b/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/data.ts new file mode 100644 index 000000000..bf87c2499 --- /dev/null +++ b/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/data.ts @@ -0,0 +1,45 @@ +export type CampaignData = { + cid: string; + user: { + name: string; + }; +}; + +export const mock = [ + { + cid: "00000000", + user: { + name: "김철수", + }, + }, + { + cid: "00000001", + user: { + name: "홍길동", + }, + }, + { + cid: "00000002", + user: { + name: "박영희", + }, + }, + { + cid: "00000003", + user: { + name: "이영희", + }, + }, + { + cid: "00000004", + user: { + name: "김영희", + }, + }, + { + cid: "00000005", + user: { + name: "최영희", + }, + }, +]; diff --git a/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/portal/page.tsx b/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/portal/page.tsx index 93042df97..e474e3f60 100644 --- a/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/portal/page.tsx +++ b/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/portal/page.tsx @@ -1,7 +1,116 @@ "use client"; -import { Button } from "@/components/ui/button"; import React from "react"; +import Image from "next/image"; +import Link from "next/link"; +import { useState } from "react"; +import { useRouter } from "next/navigation"; +import { Button } from "@/components/ui/button"; +import { Dialog, DialogContent, DialogTrigger } from "@/components/ui/dialog"; +import { Input } from "@/components/ui/input"; + +export default function Home() { + return ( +
+
+ Polestar 로고 +

+ 폴스타 추천 이벤트 +

+

+ 폴스타 오너님을 위한 특별한 추천 이벤트에 참여하세요. 친구나 가족에게 + 폴스타를 소개하고 특별한 혜택을 받으세요. +

+
+ + + + + +
+ +
+
+
+
+ ); +} + +function Form() { + const [name, setName] = useState(""); + const [phone, setPhone] = useState(""); + const [error, setError] = useState(""); + const router = useRouter(); + + const handleSubmit = async (e: React.FormEvent) => { + e.preventDefault(); + setError(""); + + try { + const response = await fetch("/api/verify", { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ name, phone }), + }); + + if (response.ok) { + const { referralLink } = await response.json(); + router.push(`/success?link=${encodeURIComponent(referralLink)}`); + } else { + setError("인증에 실패했습니다. 다시 시도해 주세요."); + } + } catch (err) { + setError("오류가 발생했습니다. 나중에 다시 시도해 주세요."); + } + }; -export default function BPage() { - return
; + return ( +
+

인증하기

+

+ 귀하의 이름과 전화번호를 입력하여 추천 링크를 받으세요. +

+ +
+ + setName(e.target.value)} + required + /> +
+
+ + setPhone(e.target.value)} + required + /> +
+ {error &&

{error}

} + + +
+ ); } diff --git a/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/timer.tsx b/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/timer.tsx new file mode 100644 index 000000000..5ecdffeea --- /dev/null +++ b/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/timer.tsx @@ -0,0 +1,32 @@ +import React from "react"; +import { useTimer } from "react-timer-hook"; + +function getNextKSTMidnight() { + const now = new Date(); + const nowKST = new Date( + now.toLocaleString("en-US", { timeZone: "Asia/Seoul" }) + ); + const nextMidnightKST = new Date(nowKST); + nextMidnightKST.setDate(nowKST.getDate() + 1); + nextMidnightKST.setHours(0, 0, 0, 0); + const diff = nextMidnightKST.getTime() - nowKST.getTime(); + return new Date(now.getTime() + diff); +} + +export function CountdownTimer() { + const expiryTimestamp = getNextKSTMidnight(); + const { hours, minutes, seconds } = useTimer({ + expiryTimestamp, + onExpire: () => console.warn("Timer expired"), + }); + + return ( +
+
+
+ {hours}h : {minutes}m : {seconds}s +
+
+
+ ); +} From 5aaa4108facf76163233859717603d522dd84e8c Mon Sep 17 00:00:00 2001 From: Universe Date: Tue, 25 Feb 2025 16:50:40 +0900 Subject: [PATCH 04/10] link --- .../sales/campaign/polestar-kr-2503/[cid]/invite/page.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/invite/page.tsx b/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/invite/page.tsx index dbe5aa7a0..6cdbce9fb 100644 --- a/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/invite/page.tsx +++ b/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/invite/page.tsx @@ -9,7 +9,6 @@ import { ScreenRoot, ScreenScrollable, ScreenWindowRoot, - Timer, } from "@/theme/templates/kit/components"; import { CampaignData, mock } from "../../data"; import { CountdownTimer } from "../../timer"; @@ -18,8 +17,10 @@ const mkshare = (d: CampaignData) => { return { title: "Polestar 2", text: `${d.user.name}님의 Polestar 2 시승 초대 이벤트`, - // url: `https://demo.grida.co/${d.cid}`, - url: `http://localhost:3000/demo/sales/campaign/polestar-kr-2503/${d.cid}/join`, + url: + process.env.NODE_ENV === "production" + ? `https://demo.grida.co/demo/sales/campaign/polestar-kr-2503/${d.cid}/join` + : `http://localhost:3000/demo/sales/campaign/polestar-kr-2503/${d.cid}/join`, }; }; From 6f79eca903b50d0984d9bb867bf6757ec85f95eb Mon Sep 17 00:00:00 2001 From: ryujunghy3on Date: Tue, 25 Feb 2025 20:52:10 +0900 Subject: [PATCH 05/10] form page --- .../polestar-kr-2503/[cid]/join/page.tsx | 128 ++++++++++++++---- .../sales/campaign/polestar-kr-2503/timer.tsx | 2 +- 2 files changed, 101 insertions(+), 29 deletions(-) diff --git a/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/join/page.tsx b/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/join/page.tsx index 1d026bb18..5ae7765b8 100644 --- a/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/join/page.tsx +++ b/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/join/page.tsx @@ -1,6 +1,6 @@ "use client"; import React from "react"; -import { Button } from "@/components/ui/button"; +import { Button as FancyButton } from "@/www/ui/button"; import { ScreenBackground, ScreenMobileFrame, @@ -13,6 +13,13 @@ import { notFound } from "next/navigation"; import { ArrowRight } from "lucide-react"; import { CountdownTimer } from "../../timer"; import { Card } from "@/components/ui/card"; +import { Button } from "@/components/ui/button"; +import { + Accordion, + AccordionContent, + AccordionItem, + AccordionTrigger, +} from "@/components/ui/accordion"; const EXT_FORM_LINK = "https://www.polestar.com/kr/test-drive/booking/ps4/at-polestar"; @@ -59,27 +66,35 @@ function Hero({ data, onNext }: { data: CampaignData; onNext?: () => void }) { {/* Content Overlay */} -
+
{/* Logo */} -

Polestar

+

Polestar

{/* Hero Content */} -
-

- {data.user.name}님이 추천하는 Polestar 4 -

-

+

+
+

+ {data.user.name}님이 추천하는 +
Polestar 4 +

+ {/*

혁신적 디자인의 전기 퍼포먼스 SUV 쿠페 -

-

- 지금 시승 신청하고 100% 당첨 경품을 받아보세요 -

- - +

*/} +

+ 지금 시승 신청하고 100% 당첨 경품을 받아보세요. +

+
+ + + 내용 확인하기 +
@@ -104,8 +119,10 @@ function Main() { className="object-cover aspect-square select-none pointer-events-none" />
-

Polestar 4

-

시승 초대하고 경품을 받아보세요

+

+ Polestar 4
+ 시승 초대하고 경품을 받아보세요 +

@@ -115,23 +132,25 @@ function Main() {
{/* Stats Grid */} - -
-

1명

-

Polestar 4

+ +
+

1명

+

Polestar 4

-

30명

-

iPad Air 11

+

20명

+

iPad Air 11

-

100%

-

스타벅스 아메리카노

+

100%

+

+ 스타벅스 아메리카노 +

{/* Info Section */} -
+

1인 당 중복 신청은 불가합니다. @@ -152,6 +171,9 @@ function Main() { 시승 전 약 15분의 차량 설명 시간이 있습니다.

+
+ +
{/* CTA Button */}
@@ -168,3 +190,53 @@ function Main() {
); } + +export function AccordionDemo() { + return ( + + + + Polestar Space + + + {" "} + {" "} + + + + + 이벤트 안내 사항 + + + 1. 시승이 완료된 후 경품이 지급됩니다.
2. 시승 신청자 본인에 + 한하여 시승 가능하며, 타인에게 양도할 수 없습니다.
3. 운전면허 + 소지자 중 만 21세 이상 및 실제 도로 주행 경력 2년 이상의 분들만 참여 + 가능합니다. +
4. 차량 시승 기간 중 총 주행 가능 거리는 300Km로 제한됩니다. +
5. 시승 기간 중 발생한 통행료, 과태료, 범칙금은 시승 고객 본인 + 부담입니다.
6. 시승 신청자에게 휴대폰 문자로 상세 안내 + 예정입니다. +
+
+
+ ); +} + +export function PolestarLocation() { + return ( +
+
+

Polestar 경기

+ + 대한민국 경기도 하남시 신장동 미사대로 750 + +
+
+

Polestar 부산

+ + 대한민국 부산광역시 해운대구 센텀4로 15 센텀시티 몰 1층 + +
+
+ ); +} diff --git a/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/timer.tsx b/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/timer.tsx index 5ecdffeea..f7641c95f 100644 --- a/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/timer.tsx +++ b/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/timer.tsx @@ -21,7 +21,7 @@ export function CountdownTimer() { }); return ( -
+

{hours}h : {minutes}m : {seconds}s From 65326e4880ae5b783846f59291f72aadb4f8bf83 Mon Sep 17 00:00:00 2001 From: ryujunghy3on Date: Tue, 25 Feb 2025 20:54:19 +0900 Subject: [PATCH 06/10] text --- .../demo/sales/campaign/polestar-kr-2503/[cid]/join/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/join/page.tsx b/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/join/page.tsx index 5ae7765b8..1bbc08ec1 100644 --- a/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/join/page.tsx +++ b/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/join/page.tsx @@ -119,7 +119,7 @@ function Main() { className="object-cover aspect-square select-none pointer-events-none" />
-

+

Polestar 4
시승 초대하고 경품을 받아보세요

From 10c6b150a8e6499cd6918ba2084c31781677c869 Mon Sep 17 00:00:00 2001 From: ryujunghy3on Date: Tue, 25 Feb 2025 21:29:51 +0900 Subject: [PATCH 07/10] form page --- .../polestar-kr-2503/[cid]/join/page.tsx | 35 ++++++++------ .../campaign/polestar-kr-2503/portal/page.tsx | 46 +++++++++++-------- 2 files changed, 48 insertions(+), 33 deletions(-) diff --git a/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/join/page.tsx b/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/join/page.tsx index 1bbc08ec1..a420b99b9 100644 --- a/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/join/page.tsx +++ b/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/join/page.tsx @@ -20,6 +20,8 @@ import { AccordionItem, AccordionTrigger, } from "@/components/ui/accordion"; +import { motion } from "framer-motion"; +import { PolestarTypeLogo } from "@/components/logos"; const EXT_FORM_LINK = "https://www.polestar.com/kr/test-drive/booking/ps4/at-polestar"; @@ -57,19 +59,20 @@ function Hero({ data, onNext }: { data: CampaignData; onNext?: () => void }) {
{/* Background Image */} - {/* eslint-disable-next-line @next/next/no-img-element */} - Polestar 4 {/* Content Overlay */}
- {/* Logo */} -

Polestar

+ {/* Hero Content */}
@@ -106,8 +109,8 @@ function Main() { return (
{/* Header */} -
-

Polestar

+
+
{/* Hero Section */} @@ -132,18 +135,22 @@ function Main() {
{/* Stats Grid */} - +
-

1명

-

Polestar 4

+

1명

+

+ Polestar 4 +

-

20명

-

iPad Air 11

+

20명

+

+ iPad Air 11 +

-

100%

-

+

100%

+

스타벅스 아메리카노

@@ -181,7 +188,7 @@ function Main() { onClick={() => { window.open(EXT_FORM_LINK, "_blank"); }} - className="w-full bg-black text-white hover:bg-gray-800" + className="w-full bg-black text-white hover:bg-gray-800 rounded-none py-6" size="lg" > 시승 신청하기 diff --git a/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/portal/page.tsx b/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/portal/page.tsx index e474e3f60..318bed6cb 100644 --- a/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/portal/page.tsx +++ b/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/portal/page.tsx @@ -7,31 +7,39 @@ import { useRouter } from "next/navigation"; import { Button } from "@/components/ui/button"; import { Dialog, DialogContent, DialogTrigger } from "@/components/ui/dialog"; import { Input } from "@/components/ui/input"; +import { PolestarTypeLogo } from "@/components/logos"; export default function Home() { return (
-
- Polestar 로고 -

- 폴스타 추천 이벤트 -

-

- 폴스타 오너님을 위한 특별한 추천 이벤트에 참여하세요. 친구나 가족에게 - 폴스타를 소개하고 특별한 혜택을 받으세요. -

-
+
+
+ {/* eslint-disable-next-line @next/next/no-img-element */} + Polestar 4 + +
+
+

+ 폴스타 추천 이벤트 +

+ +

+ 폴스타 오너님을 위한 특별한 추천 이벤트에 참여하세요.
친구나 + 가족에게 폴스타를 소개하고 특별한 혜택을 받으세요. +

+
+
- + - +
@@ -72,7 +80,7 @@ function Form() { }; return ( -
+

인증하기

귀하의 이름과 전화번호를 입력하여 추천 링크를 받으세요. From 4289070d54b465a4671d6576a0aa1ee4c5948959 Mon Sep 17 00:00:00 2001 From: ryujunghy3on Date: Tue, 25 Feb 2025 21:44:45 +0900 Subject: [PATCH 08/10] text --- .../polestar-kr-2503/[cid]/invite/page.tsx | 91 ++++++++++++++++--- .../polestar-kr-2503/[cid]/join/page.tsx | 2 +- 2 files changed, 79 insertions(+), 14 deletions(-) diff --git a/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/invite/page.tsx b/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/invite/page.tsx index 6cdbce9fb..f76e1c88b 100644 --- a/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/invite/page.tsx +++ b/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/invite/page.tsx @@ -12,6 +12,12 @@ import { } from "@/theme/templates/kit/components"; import { CampaignData, mock } from "../../data"; import { CountdownTimer } from "../../timer"; +import { + Accordion, + AccordionContent, + AccordionItem, + AccordionTrigger, +} from "@/components/ui/accordion"; const mkshare = (d: CampaignData) => { return { @@ -67,10 +73,10 @@ export default function PolestarPromo({ className="object-cover aspect-square select-none pointer-events-none" />

-

Polestar 4

-

+

+ Polestar 4
시승 초대하고 경품을 받아보세요 -

+

@@ -80,23 +86,29 @@ export default function PolestarPromo({
{/* Stats Grid */} - -
-

1명

-

Polestar 4

+ +
+

1명

+

+ Polestar 4 +

-

30명

-

iPad Air 11

+

20명

+

+ iPad Air 11 +

-

100%

-

스타벅스 아메리카노

+

100%

+

+ 스타벅스 아메리카노 +

{/* Info Section */} -
+

@@ -116,12 +128,15 @@ export default function PolestarPromo({ 1인 당 1회만 신청이 복가합니다.

+
+ +
{/* CTA Button */}
From ec64f4753e38eccd50e4a83f271667adb754e9f3 Mon Sep 17 00:00:00 2001 From: ryujunghy3on Date: Tue, 25 Feb 2025 21:45:50 +0900 Subject: [PATCH 09/10] fix build --- .../demo/sales/campaign/polestar-kr-2503/[cid]/invite/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/invite/page.tsx b/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/invite/page.tsx index f76e1c88b..e641232ff 100644 --- a/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/invite/page.tsx +++ b/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/invite/page.tsx @@ -149,7 +149,7 @@ export default function PolestarPromo({ ); } -export function AccordionDemo() { +function AccordionDemo() { return ( From 8483ca5083c302f8c87edc80a5e9a05055fdfabd Mon Sep 17 00:00:00 2001 From: ryujunghy3on Date: Tue, 25 Feb 2025 21:54:22 +0900 Subject: [PATCH 10/10] fix build --- .../sales/campaign/polestar-kr-2503/[cid]/invite/page.tsx | 2 +- .../demo/sales/campaign/polestar-kr-2503/[cid]/join/page.tsx | 4 ++-- editor/app/(www)/(home)/_home/content-1.tsx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/invite/page.tsx b/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/invite/page.tsx index e641232ff..d78375482 100644 --- a/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/invite/page.tsx +++ b/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/invite/page.tsx @@ -180,7 +180,7 @@ function AccordionDemo() { ); } -export function PolestarLocation() { +function PolestarLocation() { return (
diff --git a/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/join/page.tsx b/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/join/page.tsx index 4fd719dda..fd2d803a1 100644 --- a/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/join/page.tsx +++ b/editor/app/(demo)/demo/sales/campaign/polestar-kr-2503/[cid]/join/page.tsx @@ -198,7 +198,7 @@ function Main() { ); } -export function AccordionDemo() { +function AccordionDemo() { return ( @@ -229,7 +229,7 @@ export function AccordionDemo() { ); } -export function PolestarLocation() { +function PolestarLocation() { return (
diff --git a/editor/app/(www)/(home)/_home/content-1.tsx b/editor/app/(www)/(home)/_home/content-1.tsx index 792072f1d..4980504cd 100644 --- a/editor/app/(www)/(home)/_home/content-1.tsx +++ b/editor/app/(www)/(home)/_home/content-1.tsx @@ -96,7 +96,7 @@ function BigImageContainer({ animate={{ opacity: 1 }} transition={{ duration: 1 }} > - + demo ); }