Skip to content

Commit

Permalink
Merge pull request #96 from DDD-Community/fix/94
Browse files Browse the repository at this point in the history
[FIX/QA] 2차 QA
  • Loading branch information
hwanheejung authored Aug 23, 2024
2 parents 76a73c5 + 9689de2 commit ad473cb
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 12 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
"eslint-import-resolver-typescript": "^3.6.1",
"next": "14.2.4",
"next-auth": "^5.0.0-beta.20",
"path-to-regexp": "^7.1.0",
"prettier-plugin-tailwindcss": "^0.6.5",
"react": "^18",
"react-dom": "^18",
Expand Down
Binary file added public/icons/login_polaroid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/app/(onboarding)/login/_components/Policy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const Policy = () => {
return (
<div className="text-center text-xxs text-gray-400">
<div>
시작하기 버튼을 누르시면 POLABO의
시작하기 버튼을 누르시면 POLABO의{' '}
<LinkTo
text="서비스 이용약관"
link="https://hwanheejung.notion.site/POLABO-292cb07b2fd74d7488aa4b684c67eb9a?pvs=74"
Expand Down
4 changes: 2 additions & 2 deletions src/app/(onboarding)/login/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Image from 'next/image'
import PolaroidsIcon from 'public/icons/home_polaroids.svg'
import ThreePolaroids from 'public/icons/threePolaroids.png'
import LoginPolaroid from 'public/icons/login_polaroid.png'
import PolaboLogo from 'public/images/polabo_logo.png'
import KakaoLogin from './_components/KakaoLogin'
import Policy from './_components/Policy'
Expand All @@ -16,7 +16,7 @@ const LoginPage = () => {
<Image src={PolaboLogo} priority alt="logo" className="px-20 py-0.5" />
</div>
<Image
src={ThreePolaroids}
src={LoginPolaroid}
priority
alt="polaroids icon"
className="object-contain px-20 pb-10"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const GenderForm = ({
완료
</Button>
<Link
href="/"
href="/signup/complete"
className="mb-6 text-center text-md font-semiBold text-gray-400"
>
다음에 할게요
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const NicknameForm = ({
<div className="mb-20 text-2xl font-thin leading-10">
닉네임을 정해주세요!
</div>
<div className="mx-auto">
<div className="">
<NicknameInput
value={newName}
setValue={setNewName}
Expand Down
13 changes: 13 additions & 0 deletions src/components/BirthDateInput/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
Dispatch,
SetStateAction,
useEffect,
useRef,
useState,
} from 'react'
import { twMerge } from 'tailwind-merge'
Expand All @@ -27,6 +28,9 @@ const BirthDateInput = ({
const [month, setMonth] = useState('')
const [day, setDay] = useState('')

const monthInputRef = useRef<HTMLInputElement>(null)
const dayInputRef = useRef<HTMLInputElement>(null)

useEffect(() => {
if (!value) return

Expand All @@ -53,13 +57,19 @@ const BirthDateInput = ({
const { value: inputValue } = e.target
if (/^\d{0,4}$/.test(inputValue)) {
setYear(inputValue)
if (inputValue.length === 4) {
monthInputRef.current?.focus()
}
}
}

const handleMonthChange = (e: ChangeEvent<HTMLInputElement>) => {
const { value: inputValue } = e.target
if (/^\d{0,2}$/.test(inputValue) && +inputValue <= 12) {
setMonth(inputValue)
if (inputValue.length === 2) {
dayInputRef.current?.focus()
}
}
}

Expand All @@ -69,6 +79,7 @@ const BirthDateInput = ({
setDay(inputValue)
}
}

return (
<div
className={twMerge(
Expand Down Expand Up @@ -97,6 +108,7 @@ const BirthDateInput = ({
className="w-full text-center focus:outline-none"
maxLength={2}
inputMode="numeric"
ref={monthInputRef}
/>
</div>
<span className="font-semibold text-xl text-gray-400">/</span>
Expand All @@ -109,6 +121,7 @@ const BirthDateInput = ({
className="w-full text-center focus:outline-none"
maxLength={2}
inputMode="numeric"
ref={dayInputRef}
/>
</div>
</div>
Expand Down
3 changes: 1 addition & 2 deletions src/lib/constants/polaroidConfig.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
export const FILTERS = {
NORMAL: 'none',
POLAROID:
'sepia(0.2) contrast(1.3) brightness(1.0) saturate(1.2) blur(0.5px)',
POLAROID: 'sepia(0.2) contrast(1.3) brightness(1.0) saturate(1.2) blur(0px)',
VINTAGE:
'sepia(0.4) contrast(1.1) brightness(0.9) saturate(0.8) hue-rotate(-20deg) blur(0.6px)',
} as const
8 changes: 4 additions & 4 deletions src/middleware.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { auth } from '@/auth'
import { NextRequest, NextResponse } from 'next/server'
import { match } from 'path-to-regexp'

// 경로 일치 확인
function isMatch(pathname: string, urls: string[]) {
return urls.some((url) => !!match(url)(pathname))
return urls.some((url) => {
return pathname.startsWith(url)
})
}

const matchersForAuth = ['/mypage/*', '/board/create/*', '/signup']
const matchersForAuth = ['/mypage', '/board/create', '/signup']

const matchersForLogin = ['/login']

Expand Down

0 comments on commit ad473cb

Please sign in to comment.