Skip to content

Commit 34c1f7b

Browse files
authored
Merge pull request #96 from FE9-2/feat/CI
Feat : ๊นƒํ—™ ์•ก์…˜ - CI ์ถ”๊ฐ€
2 parents b066fda + 2bb2688 commit 34c1f7b

File tree

5 files changed

+69
-15
lines changed

5 files changed

+69
-15
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: workRoot CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main # main ๋ธŒ๋žœ์น˜์— ํ‘ธ์‹œ๋  ๋•Œ ์‹คํ–‰
7+
- dev
8+
pull_request:
9+
branches:
10+
- dev
11+
12+
jobs:
13+
lint-and-build:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v3
19+
20+
- name: Set up Node.js
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: "20" # ์ตœ์‹  Node.js 20.x.x ๋ฒ„์ „ ์‚ฌ์šฉ
24+
25+
- name: Cache dependencies
26+
uses: actions/cache@v3
27+
with:
28+
path: ~/.npm
29+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
30+
restore-keys: |
31+
${{ runner.os }}-node-
32+
33+
- name: Install dependencies
34+
run: npm install
35+
36+
- name: Run linter
37+
run: npm run lint
38+
39+
- name: Build project
40+
run: npm run build

โ€Žsrc/app/(pages)/(addform)/addform/sections/WorkCondition.tsxโ€Ž

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,17 @@ export default function WorkCondition({ formData, onUpdate }: WorkConditionProps
5656
if (start) setValue("workStartDate", start.toISOString());
5757
if (end) setValue("workEndDate", end.toISOString());
5858
};
59+
5960
const errorTextStyle =
6061
"absolute -bottom-[26px] right-1 text-[13px] text-sm font-medium leading-[22px] text-state-error lg:text-base lg:leading-[26px]";
6162

6263
return (
6364
<div className="relative">
6465
<FormProvider {...methods}>
6566
<form onSubmit={handleSubmit(onSubmit)} className="my-8 flex flex-col gap-4">
67+
{/* ์ง€๋„ API ์—ฐ๋™ */}
6668
<Label>๊ทผ๋ฌด ์œ„์น˜</Label>
67-
<LocationInput variant="white" />
69+
<LocationInput variant="white" {...register("location", { required: "๊ทผ๋ฌด ์œ„์น˜๋ฅผ ์ž‘์„ฑํ•ด์ฃผ์„ธ์š”." })} />
6870

6971
<div className="relative flex flex-col gap-2">
7072
<Label>๊ทผ๋ฌด ๊ธฐ๊ฐ„</Label>
@@ -94,7 +96,12 @@ export default function WorkCondition({ formData, onUpdate }: WorkConditionProps
9496
</div>
9597

9698
<Label>์‹œ๊ธ‰</Label>
97-
<BaseInput variant="white" afterString="์›" type="number" />
99+
<BaseInput
100+
{...register("hourlyWage", { required: "์‹œ๊ธ‰์„ ์ž‘์„ฑํ•ด์ฃผ์„ธ์š”." })}
101+
variant="white"
102+
afterString="์›"
103+
errormessage={errors.hourlyWage?.message}
104+
/>
98105

99106
<Label>๊ณต๊ฐœ ์„ค์ •</Label>
100107
<div className="flex px-[14px]">

โ€Žsrc/app/components/button/default/CheckBtn.tsxโ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ interface CheckBtnProps extends InputHTMLAttributes<HTMLInputElement> {
66
label: string; // ์ฒดํฌ๋ฐ•์Šค์˜ ๋ ˆ์ด๋ธ”
77
name: string; // ์ฒดํฌ๋ฐ•์Šค์˜ name ์†์„ฑ
88
value: string; // ์ฒดํฌ๋ฐ•์Šค์˜ value ์†์„ฑ
9+
checked?: boolean; // ์ฒดํฌ๋ฐ•์Šค๊ฐ€ ์„ ํƒ๋œ ์ƒํƒœ์ธ์ง€ ์—ฌ๋ถ€
910
disabled?: boolean; // ์ฒดํฌ๋ฐ•์Šค๊ฐ€ ๋น„ํ™œ์„ฑํ™”๋œ ์ƒํƒœ์ธ์ง€ ์—ฌ๋ถ€
1011
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
1112
}

โ€Žsrc/app/components/input/text/LocationInput.tsxโ€Ž

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,24 @@
33
import { IoLocationSharp } from "react-icons/io5";
44
import BaseInput from "./BaseInput";
55
import { BaseInputProps } from "@/types/textInput";
6+
import { forwardRef } from "react";
67

7-
const LocationInput = ({ type = "text", variant, errormessage, feedbackMessage, ...props }: BaseInputProps) => {
8-
return (
9-
<BaseInput
10-
type={type}
11-
variant={variant || "white"}
12-
beforeIcon={<IoLocationSharp className="size-6 text-grayscale-100 lg:size-8" />}
13-
placeholder="์œ„์น˜๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”."
14-
errormessage={errormessage}
15-
feedbackMessage={feedbackMessage}
16-
{...props}
17-
/>
18-
);
19-
};
8+
const LocationInput = forwardRef<HTMLInputElement, BaseInputProps>(
9+
({ type = "text", variant, errormessage, feedbackMessage, ...props }, ref) => {
10+
return (
11+
<BaseInput
12+
type={type}
13+
variant={variant || "white"}
14+
beforeIcon={<IoLocationSharp className="size-6 text-grayscale-100 lg:size-8" />}
15+
placeholder="์œ„์น˜๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”."
16+
errormessage={errormessage}
17+
feedbackMessage={feedbackMessage}
18+
{...props}
19+
/>
20+
);
21+
}
22+
);
23+
24+
LocationInput.displayName = "LocationInput";
2025

2126
export default LocationInput;

โ€Žsrc/types/textInput.d.tsโ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,5 @@ export interface BaseFileInputProps {
3030
placeholder: string;
3131
onChange?: (event: Event) => void;
3232
accept?: string;
33+
isImage?: boolean;
3334
}

0 commit comments

Comments
ย (0)