Skip to content

Commit 0864392

Browse files
authored
Merge pull request #264 from GDGoCINHA/feature/recruit_core
Feature/recruit core
2 parents 3e4ea87 + ad6004e commit 0864392

3 files changed

Lines changed: 782 additions & 0 deletions

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import axios from 'axios'
2+
3+
export async function POST(request) {
4+
try {
5+
const body = await request.json()
6+
const authHeader = request.headers.get('authorization')
7+
8+
const response = await axios.post(
9+
`${process.env.NEXT_PUBLIC_BASE_API_URL}/recruit/core/applications`,
10+
body,
11+
{
12+
headers: {
13+
'Content-Type': 'application/json',
14+
...(authHeader && { Authorization: authHeader })
15+
}
16+
}
17+
)
18+
19+
return new Response(JSON.stringify(response.data), {
20+
status: response.status,
21+
headers: {
22+
'Content-Type': 'application/json'
23+
}
24+
})
25+
} catch (error) {
26+
const status = error.response?.status || 500
27+
const data = error.response?.data || { message: 'Internal server error' }
28+
29+
return new Response(JSON.stringify(data), {
30+
status: status,
31+
headers: {
32+
'Content-Type': 'application/json'
33+
}
34+
})
35+
}
36+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
'use client'
2+
3+
export default function CustomCheckbox({
4+
checked,
5+
onChange,
6+
required,
7+
label = '동의합니다.',
8+
size = 5
9+
}) {
10+
return (
11+
<label className="flex items-center cursor-pointer">
12+
{required && <span className="text-red-600 ml-1 text-xl align-middle">*</span>}
13+
<span className="text-white text-lg font-medium">{label}</span>
14+
{/* 체크박스 컨테이너 */}
15+
<div className="relative">
16+
<input
17+
type="checkbox"
18+
className="sr-only" // 기본 체크박스 숨김
19+
checked={checked}
20+
onChange={onChange}
21+
/>
22+
{/* 커스텀 체크박스 박스 */}
23+
<div
24+
className={`
25+
w-6 h-6 border-2 rounded-md transition-all duration-200 flex items-center justify-center
26+
${checked ? 'bg-red-600 border-red-600' : 'bg-transparent border-gray-500'}
27+
`}
28+
>
29+
{/* 흰색 체크 표시 (SVG) */}
30+
{checked && (
31+
<svg
32+
className="w-4 h-4 text-white"
33+
fill="none"
34+
stroke="currentColor"
35+
viewBox="0 0 24 24"
36+
xmlns="www.w3.org"
37+
>
38+
<path
39+
strokeLinecap="round"
40+
strokeLinejoin="round"
41+
strokeWidth="4"
42+
d="M5 13l4 4L19 7"
43+
></path>
44+
</svg>
45+
)}
46+
</div>
47+
</div>
48+
</label>
49+
)
50+
}

0 commit comments

Comments
 (0)