Skip to content

Commit

Permalink
feat: 졸업생의 경우 옵션에 초등학교 포함
Browse files Browse the repository at this point in the history
  • Loading branch information
hamo-o committed Sep 28, 2023
1 parent 6c7aa79 commit 04a67b6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/pages-edit/sign-up/components/graduate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ const Graduate = () => {
options={GRADUATE_OPTIONS}
value={selected}
/>
{selected === "대학교" ? <University /> : <MidHighSchool />}
{selected === "대학교" ? (
<University />
) : (
<MidHighSchool isGraduate />
)}
</>
);
};
Expand Down
4 changes: 3 additions & 1 deletion src/pages-edit/sign-up/components/middle-high-school.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import Flex from "src/components/common/Flex";

import { Route } from "src/constants/Route";

const MidHighSchool = () => {
const MidHighSchool = ({ isGraduate = false }: { isGraduate?: boolean }) => {
const router = useRouter();
const school = useInput();
const filteredSchool = useGetSchoolQuery(school.value);
Expand All @@ -31,6 +31,8 @@ const MidHighSchool = () => {
? filteredSchool.data?.schoolInfo[1].row
.filter(
(schoolInfo: any) =>
(isGraduate &&
schoolInfo.SCHUL_KND_SC_NM === "초등학교") ||
schoolInfo.SCHUL_KND_SC_NM === "고등학교" ||
schoolInfo.SCHUL_KND_SC_NM === "중학교"
)
Expand Down

0 comments on commit 04a67b6

Please sign in to comment.