Skip to content

Commit 35aad64

Browse files
authored
Merge pull request #233 from FE9-2/fix/bug/hyl
chore: μ»€μ„œ μˆ˜μ • / μ›Œν¬νΌ μˆ˜μ • νŽ˜μ΄μ§€ μˆ˜μ •
2 parents c1bf980 + d13e0ba commit 35aad64

File tree

3 files changed

+28
-5
lines changed

3 files changed

+28
-5
lines changed

β€Žsrc/app/(pages)/(workform)/work/[formId]/edit/page.tsxβ€Ž

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"use client";
22
// μ›Œν¬νΌ μˆ˜μ • νŽ˜μ΄μ§€ (사μž₯λ‹˜)
33

4-
import { useEffect, useState } from "react";
4+
import { useEffect, useMemo, useState } from "react";
55
import { useParams, useRouter, useSearchParams } from "next/navigation";
66
import { FormProvider, useForm } from "react-hook-form";
77
import axios from "axios";
@@ -33,7 +33,7 @@ export default function EditFormPage() {
3333
const {
3434
reset,
3535
handleSubmit,
36-
formState: { isDirty, isValid },
36+
formState: { isDirty },
3737
} = methods;
3838

3939
const queryClient = useQueryClient();
@@ -72,6 +72,29 @@ export default function EditFormPage() {
7272
}
7373
}, [albaFormDetailData, reset]);
7474

75+
const isComplete = useMemo(() => {
76+
// μž‘μ„±μ΄ μ™„λ£Œλœ ν•„λ“œλ“€: κΈ°λ³Έκ°’μ—μ„œ λ³€κ²½λœ 경우λ₯Ό 확인
77+
return (
78+
currentValues.title &&
79+
currentValues.description &&
80+
currentValues.location &&
81+
currentValues.workStartDate &&
82+
currentValues.workEndDate &&
83+
currentValues.recruitmentStartDate &&
84+
currentValues.recruitmentEndDate &&
85+
currentValues.workStartTime &&
86+
currentValues.workEndTime &&
87+
currentValues.age &&
88+
currentValues.preferred &&
89+
currentValues.education &&
90+
currentValues.gender &&
91+
currentValues.numberOfPositions >= 0 &&
92+
currentValues.imageUrls.length > 0 &&
93+
currentValues.hourlyWage >= 10_030 &&
94+
(currentValues.workDays.length > 0 || currentValues.isNegotiableWorkDays)
95+
);
96+
}, [currentValues]);
97+
7598
// μˆ˜μ •λœ 폼 제좜 λ¦¬μ•‘νŠΈμΏΌλ¦¬
7699
const mutation = useMutation({
77100
mutationFn: async () => {
@@ -170,7 +193,7 @@ export default function EditFormPage() {
170193
width="md"
171194
color="orange"
172195
className="h-[58px] w-full lg:h-[72px] lg:text-xl lg:leading-8"
173-
disabled={!isDirty || !isValid}
196+
disabled={!isDirty || !isComplete}
174197
onClick={handleSubmit(() => mutation.mutate())}
175198
>
176199
{mutation.isPending ? <DotLoadingSpinner /> : "μˆ˜μ •ν•˜κΈ°"}

β€Žsrc/app/components/mouseTrail/CustomCursor.tsxβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default function CustomCursor() {
1212

1313
useEffect(() => {
1414
const updatePosition = (e: MouseEvent) => {
15-
setPosition({ x: e.clientX + window.scrollX, y: e.clientY + window.scrollY });
15+
setPosition({ x: e.clientX, y: e.clientY });
1616
};
1717

1818
window.addEventListener("mousemove", updatePosition);

β€Žsrc/app/components/mouseTrail/MouseTrail.tsxβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export default function MouseTrail() {
5757
position: "absolute",
5858
left: position.x,
5959
top: position.y,
60-
transform: "translate(-50%, -50%)",
60+
// transform: "translate(-50%, -50%)",
6161
pointerEvents: "none",
6262
}}
6363
>

0 commit comments

Comments
Β (0)