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
2 changes: 1 addition & 1 deletion src/app/(pages)/(workform)/apply/[formId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export default function Apply() {
"absolute -bottom-[26px] right-1 text-[13px] text-sm font-medium leading-[22px] text-state-error lg:text-base lg:leading-[26px]";

return (
<form className="my-8 flex flex-col gap-4" onSubmit={handleSubmit(() => mutation.mutate())}>
<form className="flex flex-col gap-4" onSubmit={handleSubmit(() => mutation.mutate())}>
<Label>이름</Label>
<BaseInput
{...register("name", { required: "이름은 필수입니다" })}
Expand Down
45 changes: 24 additions & 21 deletions src/app/(pages)/(workform)/work/[formId]/components/FormActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export default function FormActions({ formId, albaFormDetailData }: FormActionsP
const isMyAlbaForm = user?.id === albaFormDetailData.ownerId;
const isOwnerRole = user?.role === "OWNER";
const buttonStyle = "h-10 lg:h-16 w-full rounded-lg font-bold lg:mb-4";
const buttonWrapStyle = "flex flex-col gap-2 text-2xl lg:gap-0";

const [isLoading, setIsLoading] = useState(false);
const queryClient = useQueryClient();
Expand Down Expand Up @@ -78,26 +79,28 @@ export default function FormActions({ formId, albaFormDetailData }: FormActionsP
// 비회원일 때
if (!user) {
return (
<div>
<Link href={`/apply/${formId}`}>
<FloatingBtn className={`${buttonStyle}`} icon={<HiMail />}>
지원하기
<div className={buttonWrapStyle}>
<div>
<Link href={`/apply/${formId}`}>
<FloatingBtn className={`${buttonStyle}`} icon={<HiMail />}>
지원하기
</FloatingBtn>
</Link>
<FloatingBtn
variant="white"
className={buttonStyle}
icon={<HiDocumentText />}
onClick={() =>
openModal("verifyMyApplication", {
formId,
isOpen: true,
onVerify: handleVerifySuccess,
})
}
>
내 지원내역 조회
</FloatingBtn>
</Link>
<FloatingBtn
variant="white"
className={buttonStyle}
icon={<HiDocumentText />}
onClick={() =>
openModal("verifyMyApplication", {
formId,
isOpen: true,
onVerify: handleVerifySuccess,
})
}
>
내 지원내역 조회
</FloatingBtn>
</div>
</div>
);
}
Expand All @@ -106,7 +109,7 @@ export default function FormActions({ formId, albaFormDetailData }: FormActionsP
if (isOwnerRole) {
if (!isMyAlbaForm) return null;
return (
<div className="flex flex-col gap-2 text-2xl lg:gap-0">
<div className={buttonWrapStyle}>
<Link href={`/work/${formId}/edit`}>
<FloatingBtn className={buttonStyle} icon={<FaEdit />} disabled={isLoading}>
{isLoading ? <DotLoadingSpinner /> : "수정하기"}
Expand All @@ -127,7 +130,7 @@ export default function FormActions({ formId, albaFormDetailData }: FormActionsP

// 사장님이 아니면 지원하기/내 지원내역 보기 버튼
return (
<div className="flex flex-col gap-2 text-2xl lg:gap-0">
<div className={buttonWrapStyle}>
{isApplicationLoading ? (
<>
<FloatingBtn className={`${buttonStyle}`} variant="white">
Expand Down
6 changes: 4 additions & 2 deletions src/app/clientLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@ export default function ClientLayout({ children }: { children: React.ReactNode }
const excludePaths = ["/login", "/signup", "/auth/callback"];
const showChannelTalk = !excludePaths.some((path) => pathname.startsWith(path));
const isHome = pathname === "/";

const isLogin = pathname === "/login";
const isSignupA = pathname === "/signup/applicant";
const isSignupO = pathname === "/signup/owner";
return (
<QueryClientProvider client={queryClient}>
<div className={`relative min-h-[80vh] ${!isHome ? "pt-16" : ""}`}>
<div className={`relative min-h-[80vh] ${!(isHome || isLogin || isSignupA || isSignupO) ? "pt-16" : ""}`}>
{children}
<MouseTrail />
<Toaster
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/button/default/ScrapBtn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const ScrapBtn = ({ className = "", formId }: ScrapBtnProps) => {
return (
<button
className={cn(
"inline-flex h-12 w-12 items-center justify-center rounded-full bg-primary-orange-50 p-2 transition-colors",
"inline-flex h-12 w-12 items-center justify-center rounded-full bg-primary-blue-50 p-2 transition-colors",
className
)}
onClick={toggleScrap}
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/card/cardList/apply/ApplyStatusCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const ApplyStatusCard = ({ formId }: ApplyStatusCardProps) => {
<button
type="button"
onClick={() => handleApplicationClick(application)}
className="col-span-3 grid grid-cols-[1fr_2fr_1fr] px-6 py-4 text-left transition-colors hover:bg-gray-50"
className="col-span-3 grid grid-cols-[1fr_2fr_1fr] items-center px-6 py-4 text-left transition-colors hover:bg-gray-50"
aria-label={`${application.name}님의 지원 정보 보기`}
>
<span className="w-2/5">{application.name}</span>
Expand Down
5 changes: 3 additions & 2 deletions src/app/components/modal/modals/apply/MyApplicationModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ const ModalHeader = () => {

const ResumeDownloadButton = ({ resumeId, resumeName }: ResumeDownloadProps) => {
const { downloadResume, downloading } = useResumeDownLoad();

const handleResumeDownload = () => {
downloadResume({ resumeId, resumeName });
};
Expand All @@ -83,6 +82,8 @@ const ApplicationContent = ({
introduction,
createdAt,
}: ApplicationResponse) => {
const user = useUser();

return (
<div className="space-y-4">
<Chip label={getStatusMap(status)} variant="positive" />
Expand All @@ -93,7 +94,7 @@ const ApplicationContent = ({
{resumeName && (
<>
<InfoRow label="이력서" value="제출됨" />
<ResumeDownloadButton resumeId={resumeId} resumeName={resumeName} />
{user && <ResumeDownloadButton resumeId={resumeId} resumeName={resumeName} />}
</>
)}
<InfoRow label="자기소개" value={introduction} isIntroduction />
Expand Down
20 changes: 19 additions & 1 deletion src/app/components/mouseTrail/CustomCursor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,45 @@ interface CursorPosition {

export default function CustomCursor() {
const [position, setPosition] = useState<CursorPosition>({ x: 0, y: 0 });
const [isVisible, setIsVisible] = useState(true);

useEffect(() => {
const updatePosition = (e: MouseEvent) => {
setPosition({ x: e.clientX, y: e.clientY });
};

// Lightbox 요소 감시
const observer = new MutationObserver((mutations) => {
mutations.forEach((mutation) => {
if (mutation.addedNodes.length) {
const lightbox = document.querySelector('[role="dialog"]');
if (lightbox) {
setIsVisible(true);
}
}
});
});

observer.observe(document.body, { childList: true, subtree: true });
window.addEventListener("mousemove", updatePosition);

return () => {
observer.disconnect();
window.removeEventListener("mousemove", updatePosition);
};
}, []);

return (
<div
data-custom-cursor
style={{
position: "fixed",
left: position.x,
top: position.y,
zIndex: 9999,
zIndex: 99999,
pointerEvents: "none",
opacity: isVisible ? 1 : 0,
transform: "translate(-50%, -50%)",
}}
>
<TreeSVG />
Expand Down
2 changes: 1 addition & 1 deletion src/utils/shareToKakao.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const shareToKakao = (content?: ShareContent) => {
title: getMetaContentByProperty("og:title") || "WorkRoot",
description:
getMetaContentByProperty("og:description") || "🌳 일을 통해 자신의 뿌리를 내리며 성장하는 구인구직 사이트",
imageUrl: getMetaContentByProperty("og:image") || "/logo.svg",
imageUrl: getMetaContentByProperty("og:image") || "/logo.png",
buttonText: "자세히 보기",
};

Expand Down
Loading