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 .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ jobs:
NEXT_PUBLIC_API_URL=${{ secrets.NEXT_PUBLIC_API_URL }}
NEXT_PUBLIC_OAUTH2=${{ secrets.NEXT_PUBLIC_OAUTH2 }}
secrets: |
npmrc=${{ secrets.NPM_TOKEN }}
NPM_TOKEN=${{ secrets.NPM_TOKEN }}
cache-from: type=gha
cache-to: type=gha,mode=max
5 changes: 3 additions & 2 deletions Docker-pinhouse-file
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ WORKDIR /pinhouse-fe
# 2️⃣ Dependencies
# =========================
FROM base AS deps
COPY package.json package-lock.json ./
RUN --mount=type=secret,id=npmrc,target=/root/.npmrc npm ci
COPY package.json package-lock.json .npmrc ./
RUN --mount=type=secret,id=NPM_TOKEN \
NPM_TOKEN="$(cat /run/secrets/NPM_TOKEN)" npm ci

# =========================
# 3️⃣ Build
Expand Down
13 changes: 10 additions & 3 deletions app/eligibility/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

import { Suspense, useEffect, useState } from "react";
import { useRouter } from "next/navigation";
import { usePathname, useRouter, useSearchParams } from "next/navigation";
import { EligibilitySection } from "@/src/widgets/eligibilitySection";
import { useEligibilityStore } from "@/src/features/eligibility/model/eligibilityStore";
import { useDiagnosisResultStore } from "@/src/features/eligibility/model/diagnosisResultStore";
Expand All @@ -12,6 +12,8 @@ import { Spinner } from "@/src/shared/ui/spinner/default";

export default function EligibilityPage() {
const router = useRouter();
const pathname = usePathname();
const searchParams = useSearchParams();
const reset = useEligibilityStore(state => state.reset);
const setDiagnosisResult = useDiagnosisResultStore(s => s.setResult);
const [isModalOpen, setIsModalOpen] = useState(false);
Expand All @@ -33,7 +35,12 @@ export default function EligibilityPage() {
},
{ incomeLevel: data.myIncomeLevel }
);
setIsModalOpen(true);
// 주소가 정확히 /eligibility 일 때만 모달 표시 (쿼리 있으면 표시 안 함)
const isEligibilityOnly =
pathname === "/eligibility" && searchParams.toString() === "";
if (isEligibilityOnly) {
setIsModalOpen(true);
}
} else {
reset();
}
Expand All @@ -46,7 +53,7 @@ export default function EligibilityPage() {
return () => {
mounted = false;
};
}, [reset, setDiagnosisResult]);
}, [pathname, reset, searchParams, setDiagnosisResult]);

const handleModalButtonClick = (index: number) => {
setIsModalOpen(false);
Expand Down
35 changes: 35 additions & 0 deletions app/eligibility/school/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
"use client";

import { useSchoolSearch } from "@/src/features/eligibility/hooks/useSchoolSearch";
import {
SchoolSearchHeader,
SchoolSearchFormSection,
SchoolSearchResultButtonSection,
} from "@/src/features/eligibility/ui/school";

export default function SchoolSearchPage() {
const {
keyword,
setKeyword,
options,
hasKeyword,
handleSelect,
handleResultClick,
} = useSchoolSearch();

return (
<section className="flex min-h-full flex-col bg-white">
<SchoolSearchHeader />
<SchoolSearchFormSection
keyword={keyword}
options={options}
onKeywordChange={setKeyword}
onSelect={handleSelect}
/>
<SchoolSearchResultButtonSection
hasKeyword={hasKeyword}
onResultClick={handleResultClick}
/>
</section>
);
}
20 changes: 20 additions & 0 deletions app/eligibility/school/result/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
"use client";

import { useSchoolSearchResult } from "@/src/features/eligibility/hooks/useSchoolSearchResult";
import {
SchoolResultHeader,
SchoolResultContentSection,
SchoolResultTryAgainSection,
} from "@/src/features/eligibility/ui/school";

export default function SchoolResultPage() {
const { keyword, message, isEligible, handleTryAgain } = useSchoolSearchResult();

return (
<section className="flex min-h-full flex-col bg-white">
<SchoolResultHeader />
<SchoolResultContentSection isEligible={isEligible} message={message} keyword={keyword} />
<SchoolResultTryAgainSection onTryAgain={handleTryAgain} />
</section>
);
}
115 changes: 115 additions & 0 deletions src/assets/images/eligibility/shcoolSearchEmptyImg.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
const SchoolSearchEmptyImg = () => {
return (
<svg
width="200"
height="200"
viewBox="0 0 200 200"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M161.875 91.7614H38.125L45.7268 72.9013C46.4781 71.0197 48.2902 69.7944 50.3232 69.7944H149.677C151.71 69.7944 153.522 71.0197 154.273 72.9013L161.875 91.7614Z"
fill="#BBBAC5"
/>
<path
d="M113.701 40.6507H100V31.8989H113.701C114.673 31.8989 115.469 32.6866 115.469 33.6493V38.8566C115.513 39.863 114.717 40.6507 113.701 40.6507Z"
fill="#D0CFD8"
/>
<path
d="M38.125 91.7178H69.0625V152.98H38.125V91.7178ZM161.875 91.7178H130.938V152.98H161.875V91.7178Z"
fill="url(#paint0_linear_10493_58312)"
/>
<path
d="M129.699 82.7911L102.518 56.2733C101.148 54.9167 98.9381 54.9167 97.568 56.2733L70.3872 82.7911C69.5916 83.5788 69.1055 84.6727 69.1055 85.7667V91.0178V92.6806V153.024H86.6393L99.9599 147.745L113.28 153.024H130.98V92.6369V90.974V85.7229C130.936 84.629 130.494 83.5788 129.699 82.7911Z"
fill="url(#paint1_linear_10493_58312)"
/>
<path
d="M100.001 100.469C107.324 100.469 113.26 94.5917 113.26 87.3415C113.26 80.0913 107.324 74.2139 100.001 74.2139C92.6784 74.2139 86.7422 80.0913 86.7422 87.3415C86.7422 94.5917 92.6784 100.469 100.001 100.469Z"
fill="white"
/>
<path
d="M97.8322 48.8312V32.5117C97.8322 31.374 98.7603 30.4551 99.9094 30.4551H100.175C101.324 30.4551 102.252 31.374 102.252 32.5117V48.8888C102.455 49.025 102.647 49.1817 102.826 49.3589L133.896 80.1213C134.825 81.0403 135.355 82.2655 135.355 83.5783L135.311 91.5424C135.355 91.5862 135.355 91.6737 135.355 91.7612C135.355 92.9864 134.383 93.9491 133.145 93.9491C131.908 93.9491 130.935 92.9864 130.935 91.7612C130.935 91.7174 130.946 91.6846 130.957 91.6518C130.968 91.619 130.979 91.5862 130.979 91.5424H130.935V86.2476C130.935 85.1098 130.449 84.0159 129.654 83.2282L102.473 56.3165C101.103 54.96 98.8928 54.96 97.5228 56.3165L70.3419 83.2282C69.5022 84.0159 69.0603 85.1098 69.0603 86.2476V91.5424H69.0161C69.0161 91.5862 69.0271 91.619 69.0382 91.6518C69.0492 91.6846 69.0603 91.7174 69.0603 91.7612C69.0603 92.9864 68.0879 93.9491 66.8504 93.9491C65.6129 93.9491 64.6406 92.9864 64.6406 91.7612C64.6406 91.7174 64.6517 91.6846 64.6627 91.6518C64.6738 91.619 64.6848 91.5862 64.6848 91.5424H64.6406V83.5783C64.6406 82.3093 65.171 81.0403 66.0991 80.1213L97.1692 49.3589C97.3739 49.1561 97.5965 48.9802 97.8322 48.8312ZM97.788 86.9477C97.788 87.027 97.792 87.1052 97.8 87.1821C97.7324 87.8127 97.9494 88.4642 98.4509 88.9607L104.992 95.437C105.39 95.8746 105.964 96.0934 106.539 96.0934C107.113 96.0934 107.644 95.8746 108.13 95.437C109.014 94.5618 109.014 93.2053 108.13 92.3301L102.208 86.4664V80.7777C102.208 79.5525 101.235 78.5898 99.9978 78.5898C98.7603 78.5898 97.788 79.5525 97.788 80.7777V86.9477Z"
fill="#9F9FAB"
/>
<path
d="M113.87 153.374H86.1848C86.0436 153.374 85.9023 153.247 85.9023 153.12V119.683C85.9023 117.302 88.0564 115.365 90.7049 115.365H109.385C112.034 115.365 114.188 117.302 114.188 119.683V153.12C114.153 153.247 114.011 153.374 113.87 153.374Z"
fill="#BBBAC5"
/>
<rect x="34.2344" y="152.63" width="131.529" height="10.5021" rx="2.12143" fill="#CECED7" />
<rect x="43.4297" y="104.315" width="9.19646" height="9.19643" rx="1.34285" fill="white" />
<rect x="43.4297" y="116.163" width="9.19646" height="9.19643" rx="1.34285" fill="white" />
<rect x="55.2773" y="104.315" width="9.19646" height="9.19643" rx="1.34285" fill="white" />
<rect x="55.2773" y="116.163" width="9.19646" height="9.19643" rx="1.34285" fill="white" />
<rect x="135.445" y="104.315" width="9.19646" height="9.19643" rx="1.34285" fill="white" />
<rect x="135.445" y="116.163" width="9.19646" height="9.19643" rx="1.34285" fill="white" />
<rect x="147.293" y="104.315" width="9.19646" height="9.19643" rx="1.34285" fill="white" />
<rect x="147.293" y="116.163" width="9.19646" height="9.19643" rx="1.34285" fill="white" />
<g clipPath="url(#clip0_10493_58312)">
<path
d="M178.914 182.534C178.082 182.534 177.252 182.218 176.617 181.583L162.03 166.995C160.761 165.727 160.761 163.671 162.03 162.402C163.298 161.134 165.354 161.134 166.623 162.402L181.21 176.989C182.479 178.258 182.479 180.314 181.21 181.583C180.575 182.218 179.745 182.534 178.914 182.534Z"
fill="#BBBAC5"
/>
<foreignObject x="117.042" y="118.031" width="61.1144" height="61.1134">
<div
style={{
backdropFilter: "blur(3.51px)",
clipPath: "url(#bgblur_1_10493_58312_clip_path)",
height: "100%",
width: "100%",
}}
></div>
</foreignObject>
<path
d="M147.598 125.059C160.573 125.059 171.128 135.615 171.128 148.589C171.128 155.074 168.488 160.954 164.229 165.215L164.231 165.217C159.971 169.478 154.087 172.116 147.601 172.116C134.627 172.116 124.07 161.56 124.07 148.586C124.07 142.099 126.709 136.216 130.97 131.955C135.23 127.696 141.112 125.059 147.598 125.059Z"
fill="white"
fillOpacity="0.6"
/>
<path
d="M147.598 174.368C133.044 174.368 121.203 162.528 121.203 147.974C121.203 133.42 133.044 121.577 147.598 121.577C162.152 121.577 173.994 133.418 173.994 147.974C173.994 162.529 162.154 174.368 147.598 174.368ZM147.598 127.309C136.204 127.309 126.935 136.58 126.935 147.974C126.935 159.367 136.206 168.636 147.598 168.636C158.989 168.636 168.262 159.365 168.262 147.974C168.262 136.582 158.991 127.309 147.598 127.309Z"
fill="#BBBAC5"
/>
<path
d="M153.924 138.837C154.799 137.962 156.217 137.962 157.092 138.837C157.967 139.712 157.967 141.13 157.092 142.005L150.516 148.58C150.486 148.61 150.486 148.659 150.516 148.689L157.092 155.265C157.967 156.139 157.967 157.558 157.092 158.433C156.217 159.307 154.799 159.307 153.924 158.433L147.348 151.857C147.318 151.827 147.27 151.827 147.24 151.857L140.664 158.433C139.789 159.307 138.371 159.307 137.496 158.433C136.621 157.558 136.621 156.139 137.496 155.265L144.071 148.689C144.101 148.659 144.101 148.61 144.071 148.58L137.496 142.005C136.621 141.13 136.621 139.712 137.496 138.837C138.371 137.962 139.789 137.962 140.664 138.837L147.24 145.412C147.27 145.442 147.318 145.442 147.348 145.412L153.924 138.837Z"
fill="#9F9FAB"
/>
</g>
<defs>
<clipPath id="bgblur_1_10493_58312_clip_path" transform="translate(-117.042 -118.031)">
<path d="M147.598 125.059C160.573 125.059 171.128 135.615 171.128 148.589C171.128 155.074 168.488 160.954 164.229 165.215L164.231 165.217C159.971 169.478 154.087 172.116 147.601 172.116C134.627 172.116 124.07 161.56 124.07 148.586C124.07 142.099 126.709 136.216 130.97 131.955C135.23 127.696 141.112 125.059 147.598 125.059Z" />
</clipPath>
<linearGradient
id="paint0_linear_10493_58312"
x1="100"
y1="91.7178"
x2="100"
y2="152.98"
gradientUnits="userSpaceOnUse"
>
<stop stopColor="#CCCCD7" />
<stop offset="1" stopColor="#E1E1E6" />
</linearGradient>
<linearGradient
id="paint1_linear_10493_58312"
x1="100.043"
y1="55.2559"
x2="100.043"
y2="153.024"
gradientUnits="userSpaceOnUse"
>
<stop stopColor="#DDDDE5" />
<stop offset="1" stopColor="#F2F2F8" />
</linearGradient>
<clipPath id="clip0_10493_58312">
<rect
width="76.4286"
height="76.4286"
fill="white"
transform="translate(113.734 114.286)"
/>
</clipPath>
</defs>
</svg>
);
};

export default SchoolSearchEmptyImg;
Loading