Skip to content

Commit ae8753b

Browse files
authored
Merge pull request #220 from CSE-Shaco/develop
fix(homecoming): modify typo for specific groups
2 parents 6053345 + bf4eb02 commit ae8753b

File tree

1 file changed

+28
-19
lines changed

1 file changed

+28
-19
lines changed

src/app/homecoming/page.jsx

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import {useState} from 'react';
44
import {GoogleMap, Marker, useJsApiLoader} from '@react-google-maps/api';
55
import Image from 'next/image';
6+
import {useSearchParams} from "next/navigation";
67

78
export default function HomecomingPage() {
89
const [showInvitation, setShowInvitation] = useState(false);
@@ -45,6 +46,12 @@ export default function HomecomingPage() {
4546
Hero 컴포넌트
4647
================================ */
4748
function Hero({onOpenInvitation}) {
49+
const searchParams = useSearchParams();
50+
51+
// 예: /homecoming?from=GOAT+멤버
52+
const rawText = searchParams.get('from'); // 없으면 null
53+
const testText = rawText ? (decodeURIComponent(rawText) + " ") : ''; // 기본값 처리
54+
4855
return (<div className="flex flex-1 flex-col items-center gap-8 text-center">
4956
<Image
5057
src="/images/homecoming/main_img.png"
@@ -55,11 +62,13 @@ function Hero({onOpenInvitation}) {
5562
className="w-full max-w-2xl mt-[calc(50vh-235px)] md:mt-[100px] md:max-w-[790px]"
5663
/>
5764

58-
59-
<h1 className="text-2xl font-extrabold leading-tight text-neutral-900 md:text-4xl lg:text-5xl">
65+
<h1 className="text-xl font-extrabold leading-tight text-neutral-900 md:text-4xl lg:text-5xl">
6066
GDGoC INHA
6167
<br/>
62-
제1회 홈커밍데이에 초대합니다!
68+
제1회 홈커밍데이에
69+
<br/>
70+
{testText && (<>{testText}</>)}
71+
여러분을 초대합니다!
6372
</h1>
6473

6574
<button
@@ -223,27 +232,27 @@ function HomecomingMap() {
223232

224233
if (loadError) {
225234
return (<div
226-
className="rounded-2xl border border-red-300 bg-red-50 text-red-700 text-xs md:text-sm flex items-center justify-center h-[220px] md:h-[320px] lg:h-[420px]">
227-
지도를 불러오는 중 오류가 발생했습니다.
228-
</div>);
235+
className="rounded-2xl border border-red-300 bg-red-50 text-red-700 text-xs md:text-sm flex items-center justify-center h-[220px] md:h-[320px] lg:h-[420px]">
236+
지도를 불러오는 중 오류가 발생했습니다.
237+
</div>);
229238
}
230239

231240
if (!isLoaded) {
232241
return (<div
233-
className="rounded-2xl border border-neutral-200 bg-neutral-100 text-neutral-500 text-xs md:text-sm flex items-center justify-center h-[220px] md:h-[320px] lg:h-[420px]">
234-
지도를 불러오는 중입니다...
235-
</div>);
242+
className="rounded-2xl border border-neutral-200 bg-neutral-100 text-neutral-500 text-xs md:text-sm flex items-center justify-center h-[220px] md:h-[320px] lg:h-[420px]">
243+
지도를 불러오는 중입니다...
244+
</div>);
236245
}
237246

238247
return (<div
239-
className="rounded-2xl overflow-hidden border border-neutral-200 bg-neutral-100 h-[220px] md:h-[320px] lg:h-[420px]">
240-
<GoogleMap
241-
mapContainerClassName="w-full h-full"
242-
center={center}
243-
zoom={17}
244-
options={{disableDefaultUI: true, clickableIcons: false}}
245-
>
246-
<Marker position={center}/>
247-
</GoogleMap>
248-
</div>);
248+
className="rounded-2xl overflow-hidden border border-neutral-200 bg-neutral-100 h-[220px] md:h-[320px] lg:h-[420px]">
249+
<GoogleMap
250+
mapContainerClassName="w-full h-full"
251+
center={center}
252+
zoom={17}
253+
options={{disableDefaultUI: true, clickableIcons: false}}
254+
>
255+
<Marker position={center}/>
256+
</GoogleMap>
257+
</div>);
249258
}

0 commit comments

Comments
 (0)