diff --git a/app/join/page.tsx b/app/join/page.tsx new file mode 100644 index 0000000..8f17e01 --- /dev/null +++ b/app/join/page.tsx @@ -0,0 +1,115 @@ +'use client'; + +import { useState } from 'react'; + +export default function JoinMeetingPage() { + const [name, setName] = useState(''); + const [password, setPassword] = useState(''); + const [isRemembered, setIsRemembered] = useState(true); + + // 이름/비번 유효성 검사 (입력값이 있을 때만 버튼 활성화) + const isFormValid = name.length > 0 && password.length === 4; + + const handleSubmit = (e: React.FormEvent) => { + e.preventDefault(); + if (!isFormValid) return; + + console.log('참여 요청:', { name, password, isRemembered }); + }; + + return ( +
+ {/* 타이틀 */} +

+ 모임에 참여해 주세요. +

+ +
+ {/* 이름 입력 */} +
+ + setName(e.target.value)} + placeholder="최대 20자 이내로 입력해주세요" + maxLength={20} + className="border-gray-2 placeholder:text-gray-3 text-gray-10 focus:border-blue-5 w-full rounded-sm border py-2 pl-3 text-[15px] focus:bg-white focus:outline-none" + /> +
+ + {/* 비밀번호 입력 */} +
+ + { + // 4자리 숫자만 입력받도록 처리하기 + const val = e.target.value.replace(/[^0-9]/g, ''); + if (val.length <= 4) setPassword(val); + }} + placeholder="숫자 4자리를 입력해주세요" + className={`border-gray-2 placeholder:text-gray-3 text-gray-10 focus:border-blue-5 w-full rounded-sm border py-2 pl-3 text-center text-[15px] focus:bg-white focus:outline-none ${password ? 'pl-0 text-center' : 'pl-3 text-left'}`} + /> + {/* 체크박스 */} +
setIsRemembered(!isRemembered)} + className="flex cursor-pointer items-center gap-2" + > + {/* 체크 아이콘 박스 */} +
+ {isRemembered && ( + + + + )} +
+ + 내 정보 기억하기 + +
+
+ {/* 하단 버튼 */} + +
+
+ ); +} diff --git a/app/share/page.tsx b/app/share/page.tsx index c12f281..79cd3bf 100644 --- a/app/share/page.tsx +++ b/app/share/page.tsx @@ -55,7 +55,7 @@ export default function ShareLinkPage() { 내 출발지 등록하기