Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: workRoot CI

on:
push:
branches:
- main # main 브랜치에 푸시될 때 실행
- dev
pull_request:
branches:
- dev

jobs:
lint-and-build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "20" # 최신 Node.js 20.x.x 버전 사용

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-

- name: Install dependencies
run: npm install

- name: Run linter
run: npm run lint

- name: Build project
run: npm run build
11 changes: 9 additions & 2 deletions src/app/(pages)/(addform)/addform/sections/WorkCondition.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,17 @@ export default function WorkCondition({ formData, onUpdate }: WorkConditionProps
if (start) setValue("workStartDate", start.toISOString());
if (end) setValue("workEndDate", end.toISOString());
};

const errorTextStyle =
"absolute -bottom-[26px] right-1 text-[13px] text-sm font-medium leading-[22px] text-state-error lg:text-base lg:leading-[26px]";

return (
<div className="relative">
<FormProvider {...methods}>
<form onSubmit={handleSubmit(onSubmit)} className="my-8 flex flex-col gap-4">
{/* 지도 API 연동 */}
<Label>근무 위치</Label>
<LocationInput variant="white" />
<LocationInput variant="white" {...register("location", { required: "근무 위치를 작성해주세요." })} />

<div className="relative flex flex-col gap-2">
<Label>근무 기간</Label>
Expand Down Expand Up @@ -94,7 +96,12 @@ export default function WorkCondition({ formData, onUpdate }: WorkConditionProps
</div>

<Label>시급</Label>
<BaseInput variant="white" afterString="원" type="number" />
<BaseInput
{...register("hourlyWage", { required: "시급을 작성해주세요." })}
variant="white"
afterString="원"
errormessage={errors.hourlyWage?.message}
/>

<Label>공개 설정</Label>
<div className="flex px-[14px]">
Expand Down
4 changes: 2 additions & 2 deletions src/app/api/(file)/resume/upload/route.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import apiClient from "@/lib/apiClient";
import { cookies } from "next/headers";
import { NextRequest, NextResponse } from "next/server";
import apiClientNoHeader from "@/lib/apiClientNoHeader";

export async function POST(req: NextRequest) {
const accessToken = cookies().get("accessToken")?.value;
Expand All @@ -22,7 +22,7 @@ export async function POST(req: NextRequest) {
const uploadFormData = new FormData();
uploadFormData.append("file", file);

const response = await apiClientNoHeader.post("/resume/upload", uploadFormData, {
const response = await apiClient.post("/resume/upload", uploadFormData, {
headers: {
Authorization: `Bearer ${accessToken}`,
"Content-Type": "multipart/form-data",
Expand Down
1 change: 1 addition & 0 deletions src/app/components/button/default/CheckBtn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ interface CheckBtnProps extends InputHTMLAttributes<HTMLInputElement> {
label: string; // 체크박스의 레이블
name: string; // 체크박스의 name 속성
value: string; // 체크박스의 value 속성
checked?: boolean; // 체크박스가 선택된 상태인지 여부
disabled?: boolean; // 체크박스가 비활성화된 상태인지 여부
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ const ImageInputwithPlaceHolder = () => {
name="image"
onFileAction={handleFileChange}
size={size}
isImage={true}
placeholder=""
/>
<div className="pointer-events-none absolute inset-0 flex flex-col items-center justify-center">
Expand Down
31 changes: 18 additions & 13 deletions src/app/components/input/text/LocationInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,24 @@
import { IoLocationSharp } from "react-icons/io5";
import BaseInput from "./BaseInput";
import { BaseInputProps } from "@/types/textInput";
import { forwardRef } from "react";

const LocationInput = ({ type = "text", variant, errormessage, feedbackMessage, ...props }: BaseInputProps) => {
return (
<BaseInput
type={type}
variant={variant || "white"}
beforeIcon={<IoLocationSharp className="size-6 text-grayscale-100 lg:size-8" />}
placeholder="위치를 입력해주세요."
errormessage={errormessage}
feedbackMessage={feedbackMessage}
{...props}
/>
);
};
const LocationInput = forwardRef<HTMLInputElement, BaseInputProps>(
({ type = "text", variant, errormessage, feedbackMessage, ...props }, ref) => {
return (
<BaseInput
type={type}
variant={variant || "white"}
beforeIcon={<IoLocationSharp className="size-6 text-grayscale-100 lg:size-8" />}
placeholder="위치를 입력해주세요."
errormessage={errormessage}
feedbackMessage={feedbackMessage}
{...props}
/>
);
}
);

LocationInput.displayName = "LocationInput";

export default LocationInput;
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ export default meta;
type Story = StoryObj<typeof DatePickerInput>;

export const DatePicker: Story = {
render: () => <DatePickerInput />,
render: () => <DatePickerInput startDateName="startDate" endDateName="endDate" onChange={() => {}} />,
};
9 changes: 0 additions & 9 deletions src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,6 @@ export function decodeJwt(token: string) {
}
}

// 토큰 만료 체크 함수
function isTokenExpired(token: string) {
const decodedToken = decodeJwt(token);
if (!decodedToken) return true;

const currentTime = Math.floor(Date.now() / 1000);
return decodedToken.exp < currentTime;
}

export const config = {
matcher: [
/*
Expand Down
1 change: 1 addition & 0 deletions src/types/textInput.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ export interface BaseFileInputProps {
placeholder: string;
onChange?: (event: Event) => void;
accept?: string;
isImage?: boolean;
}
Loading