Skip to content

Commit a4d9bda

Browse files
authored
Merge pull request #231 from FE9-2/feat/applicationStatus-change
Feat: ์ง€์›ํ˜„ํ™ฉ ์—…๋ฐ์ดํŠธ ๊ธฐ๋Šฅ ๊ตฌํ˜„, ์ด๋ฏธ์ง€ dnd ์ถ”๊ฐ€ / chore: ์ฝ˜์†” ๊ฒฝ๊ณ  ๊ฐœ์„ , ์•Œ๋ฐ”ํผ ์ž‘์„ฑ ์ด๋ฏธ์ง€ ์—ฌ๋Ÿฌ๊ฐœ ์—…๋กœ๋“œ
2 parents 0e0314f + afd3824 commit a4d9bda

File tree

26 files changed

+457
-2734
lines changed

26 files changed

+457
-2734
lines changed

โ€Ž.storybook/main.tsโ€Ž

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ interface StorybookConfig extends BaseStorybookConfig {
55
}
66

77
const config: StorybookConfig = {
8-
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
8+
stories: [
9+
"../src/**/*.mdx",
10+
"../src/**/*.stories.@(js|jsx|mjs|ts|tsx)",
11+
"../src/app/stories/**/*.stories.@(js|jsx|mjs|ts|tsx)",
12+
],
913
addons: [
1014
"@storybook/addon-links",
1115
"@storybook/addon-essentials",

โ€Žpackage-lock.jsonโ€Ž

Lines changed: 133 additions & 2557 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

โ€Žpackage.jsonโ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"next-sitemap": "^4.2.3",
3030
"prettier": "^3.3.3",
3131
"react": "^18",
32+
"react-beautiful-dnd": "^13.1.1",
3233
"react-datepicker": "^7.5.0",
3334
"react-dom": "^18",
3435
"react-hook-form": "^7.53.0",
@@ -60,6 +61,7 @@
6061
"@tanstack/react-query-devtools": "^5.59.20",
6162
"@types/node": "^20",
6263
"@types/react": "^18.3.11",
64+
"@types/react-beautiful-dnd": "^13.1.8",
6365
"@types/react-datepicker": "^6.2.0",
6466
"@types/react-dom": "^18",
6567
"@typescript-eslint/eslint-plugin": "^8.9.0",

โ€Žpublic/favicon.svgโ€Ž

Lines changed: 0 additions & 3 deletions
This file was deleted.

โ€Žsrc/app/(home)/page.tsxโ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export default function LandingPage() {
125125
height: { duration: 0.8, ease: "easeInOut" },
126126
}}
127127
>
128-
<Image src="/brand.png" alt="Brand Logo" layout="fill" objectFit="contain" />
128+
<Image src="/brand.png" alt="Brand Logo" fill className="object-contain" priority />
129129
</motion.div>
130130
</motion.div>
131131
<AnimatePresence mode="wait">
@@ -158,6 +158,7 @@ export default function LandingPage() {
158158
width={400}
159159
height={300}
160160
className="mb-6 object-cover"
161+
priority
161162
/>
162163
</motion.div>
163164
<motion.p

โ€Žsrc/app/(pages)/(workform)/addform/section/RecruitContentSection.tsxโ€Ž

Lines changed: 36 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -31,36 +31,48 @@ export default function RecruitContentSection() {
3131
const imageUrlsData: string[] = watch("imageUrls");
3232

3333
// ์ด๋ฏธ์ง€ ํŒŒ์ผ changeํ•ธ๋“ค๋Ÿฌ
34-
const handleChangeImages = async (files: File[]) => {
35-
let uploadedUrls: string[] = [];
36-
//ํŒŒ์ผ ์„ ํƒ ์‹œ ์—…๋กœ๋“œ api ์š”์ฒญ
37-
try {
38-
uploadedUrls = await uploadImages(files);
39-
} catch (err) {
40-
console.log("์ด๋ฏธ์ง€ ํŒŒ์ผ ์ฒด์ธ์ง€ ํ•ธ๋“ค๋Ÿฌ - ์ด๋ฏธ์ง€ ์—…๋กœ๋“œ ์‹คํŒจ");
41-
console.error(err);
42-
}
43-
// ์„ ํƒํ•œ ์ด๋ฏธ์ง€ ์—…๋ฐ์ดํŠธ
44-
const updatedImageList =
45-
uploadedUrls.map((url) => ({
34+
const handleChangeImages = async (files: File[] | string[]) => {
35+
// files๊ฐ€ File[] ํƒ€์ž…์ธ ๊ฒฝ์šฐ (์ƒˆ๋กœ์šด ์ด๋ฏธ์ง€ ์—…๋กœ๋“œ)
36+
if (files.length > 0 && files[0] instanceof File) {
37+
let uploadedUrls: string[] = [];
38+
try {
39+
uploadedUrls = await uploadImages(files as File[]);
40+
} catch (err) {
41+
console.log("์ด๋ฏธ์ง€ ํŒŒ์ผ ์ฒด์ธ์ง€ ํ•ธ๋“ค๋Ÿฌ - ์ด๋ฏธ์ง€ ์—…๋กœ๋“œ ์‹คํŒจ");
42+
console.error(err);
43+
}
44+
45+
// ์„ ํƒํ•œ ์ด๋ฏธ์ง€ ์—…๋ฐ์ดํŠธ
46+
const updatedImageList = uploadedUrls.map((url) => ({
4647
url,
4748
id: crypto.randomUUID(),
48-
})) || [];
49+
}));
4950

50-
// ๊ธฐ์กด ์ด๋ฏธ์ง€ ํฌํ•จํ•˜๊ธฐ
51-
const originalImageList =
52-
imageUrlsData.map((url) => ({
51+
// ๊ธฐ์กด ์ด๋ฏธ์ง€ ํฌํ•จํ•˜๊ธฐ
52+
const originalImageList = imageUrlsData.map((url) => ({
5353
url,
5454
id: crypto.randomUUID(),
55-
})) || [];
55+
}));
5656

57-
const allImageList = [...originalImageList, ...updatedImageList];
58-
const submitImageList = [...imageUrlsData, ...uploadedUrls];
57+
const allImageList = [...originalImageList, ...updatedImageList];
58+
const submitImageList = [...imageUrlsData, ...uploadedUrls];
5959

60-
// prop์œผ๋กœ ์ „๋‹ฌ
61-
setInitialImageList(allImageList);
62-
// ํ›…ํผ ๋ฐ์ดํ„ฐ์— ์„ธํŒ…
63-
setValue("imageUrls", submitImageList, { shouldDirty: true });
60+
// prop์œผ๋กœ ์ „๋‹ฌ
61+
setInitialImageList(allImageList);
62+
// ํ›…ํผ ๋ฐ์ดํ„ฐ์— ์„ธํŒ…
63+
setValue("imageUrls", submitImageList, { shouldDirty: true });
64+
}
65+
// files๊ฐ€ string[] ํƒ€์ž…์ธ ๊ฒฝ์šฐ (๋“œ๋ž˜๊ทธ ์•ค ๋“œ๋กญ์œผ๋กœ ์ˆœ์„œ ๋ณ€๊ฒฝ)
66+
else {
67+
const urls = files as string[];
68+
const newImageList = urls.map((url) => ({
69+
url,
70+
id: crypto.randomUUID(),
71+
}));
72+
73+
setInitialImageList(newImageList);
74+
setValue("imageUrls", urls, { shouldDirty: true });
75+
}
6476
};
6577

6678
const handleDeleteImage = (url: string) => {
@@ -142,7 +154,7 @@ export default function RecruitContentSection() {
142154
<div className="relative">
143155
<ImageInput
144156
{...register("imageUrls")}
145-
onChange={(files: File[]) => {
157+
onChange={(files: File[] | string[]) => {
146158
handleChangeImages(files);
147159
}}
148160
onDelete={(id) => handleDeleteImage(id)}

โ€Žsrc/app/(pages)/(workform)/addform/section/WorkConditionSection.tsxโ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"use client";
22

33
import { useFormContext, Controller } from "react-hook-form";
4-
import { useState, ChangeEvent, MouseEvent, useCallback } from "react";
4+
import { ChangeEvent, MouseEvent, useCallback } from "react";
55
import { cn } from "@/lib/tailwindUtil";
66
import DatePickerInput from "@/app/components/input/dateTimeDaypicker/DatePickerInput";
77
import TimePickerInput from "@/app/components/input/dateTimeDaypicker/TimePickerInput";
@@ -80,6 +80,7 @@ export default function WorkConditionSection() {
8080
setValue("location", fullAddress);
8181
trigger("location");
8282
},
83+
// eslint-disable-next-line react-hooks/exhaustive-deps
8384
[setValue]
8485
);
8586

โ€Žsrc/app/(pages)/(workform)/work/[formId]/components/FormImage.tsxโ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default function FormImage({ imageUrls, currentPage, onPageChange }: Form
2424
alt={`์•Œ๋ฐ” ์ด๋ฏธ์ง€ ${index + 1}`}
2525
className="h-full w-full rounded-lg object-cover"
2626
priority={index === 0}
27-
layout="fill"
27+
fill
2828
/>
2929
</div>
3030
))}

โ€Žsrc/app/clientLayout.tsxโ€Ž

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
55
import dynamic from "next/dynamic";
66
import { Toaster } from "react-hot-toast";
77
import ModalLayout from "@/app/components/modal/ModalLayout";
8+
import MouseTrail from "./components/mouseTrail/MouseTrail";
89

910
const ReactQueryDevtools = dynamic(
1011
() => import("@tanstack/react-query-devtools").then((mod) => mod.ReactQueryDevtools),
@@ -31,20 +32,24 @@ export default function ClientLayout({ children }: { children: React.ReactNode }
3132

3233
return (
3334
<QueryClientProvider client={queryClient}>
34-
{children}
35-
<Toaster
36-
position="top-center"
37-
reverseOrder={false}
38-
toastOptions={{
39-
duration: 3000,
40-
style: {
41-
background: "#363636",
42-
color: "#fff",
43-
},
44-
}}
45-
/>
46-
{process.env.NODE_ENV === "development" && <ReactQueryDevtools initialIsOpen={false} />}
47-
<ModalLayout />
35+
<div className="relative">
36+
{children}
37+
<MouseTrail />
38+
<Toaster
39+
position="top-center"
40+
reverseOrder={false}
41+
toastOptions={{
42+
duration: 3000,
43+
style: {
44+
background: "#363636",
45+
color: "#fff",
46+
zIndex: 10000,
47+
},
48+
}}
49+
/>
50+
{process.env.NODE_ENV === "development" && <ReactQueryDevtools initialIsOpen={false} />}
51+
<ModalLayout />
52+
</div>
4853
</QueryClientProvider>
4954
);
5055
}

โ€Žsrc/app/components/card/cardList/AlbaListItem.tsxโ€Ž

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ import DotLoadingSpinner from "@/app/components/loading-spinner/DotLoadingSpinne
1212
import { isValidS3Url } from "@/utils/checkS3Url";
1313
import { useUser } from "@/hooks/queries/user/me/useUser";
1414
import { userRoles } from "@/constants/userRoles";
15-
import EmptyImage from "./EmptyImage";
1615
import InfoItem from "./InfoItem";
1716
import { useDeleteForm } from "@/hooks/queries/form/useDeleteForm";
17+
import EmptyImage from "./EmptyImage";
1818

1919
interface AlbaListItemProps extends FormListType {
2020
isMyForm?: boolean;
@@ -153,10 +153,13 @@ const AlbaListItem = ({
153153
isValidS3Url(imageUrls[0]) ? (
154154
<Image
155155
src={imageUrls[0]}
156-
alt="Recruit Image"
156+
alt={`${title} ์ด๋ฏธ์ง€`}
157157
fill
158+
sizes="(max-width: 768px) 327px, 372px"
158159
className="object-cover transition-opacity duration-300"
159160
onError={() => setImageError(true)}
161+
priority
162+
quality={75}
160163
/>
161164
) : (
162165
<EmptyImage />

0 commit comments

Comments
ย (0)