diff --git a/apps/shelter/src/pages/volunteers/search/_components/RecruitmentsSearchFilter.tsx b/apps/shelter/src/pages/volunteers/search/_components/RecruitmentsSearchFilter.tsx index fda5241b..65415aa6 100644 --- a/apps/shelter/src/pages/volunteers/search/_components/RecruitmentsSearchFilter.tsx +++ b/apps/shelter/src/pages/volunteers/search/_components/RecruitmentsSearchFilter.tsx @@ -2,9 +2,9 @@ import { ChangeEvent } from 'react'; import SearchFilters, { SearchFilterSelectData, } from 'shared/components/SearchFilters'; +import { PERIOD } from 'shared/constants/period'; import { - PERIOD, RECRUITMENT_STATUS, SEARCH_TYPE, } from '@/pages/volunteers/search/_constants/filter'; diff --git a/apps/shelter/src/pages/volunteers/search/_constants/filter.ts b/apps/shelter/src/pages/volunteers/search/_constants/filter.ts index a4a9014c..9356e5f0 100644 --- a/apps/shelter/src/pages/volunteers/search/_constants/filter.ts +++ b/apps/shelter/src/pages/volunteers/search/_constants/filter.ts @@ -1,10 +1,3 @@ -export const PERIOD = { - WITHIN_ONE_DAY: '1일 이내', - WITHIN_ONE_WEEK: '1주 이내', - WITHIN_ONE_MONTH: '1달 이내', - WITHIN_THREE_MONTH: '3달 이내', -} as const; - export const RECRUITMENT_STATUS = { IS_OPENED: '모집 중', IS_CLOSED: '모집 완료', diff --git a/apps/shelter/src/pages/volunteers/search/_types/filter.ts b/apps/shelter/src/pages/volunteers/search/_types/filter.ts index a959b6f6..b1712e71 100644 --- a/apps/shelter/src/pages/volunteers/search/_types/filter.ts +++ b/apps/shelter/src/pages/volunteers/search/_types/filter.ts @@ -1,10 +1,10 @@ +import { Period } from 'shared/types/period'; + import { - PERIOD, RECRUITMENT_STATUS, SEARCH_TYPE, } from '@/pages/volunteers/search/_constants/filter'; -export type Period = keyof typeof PERIOD; export type RecruitmentStatus = keyof typeof RECRUITMENT_STATUS; export type SearchType = keyof typeof SEARCH_TYPE; diff --git a/apps/shelter/src/pages/volunteers/search/index.tsx b/apps/shelter/src/pages/volunteers/search/index.tsx index 97753c07..4dbc5f0d 100644 --- a/apps/shelter/src/pages/volunteers/search/index.tsx +++ b/apps/shelter/src/pages/volunteers/search/index.tsx @@ -2,13 +2,13 @@ import { Box } from '@chakra-ui/react'; import { useInfiniteQuery } from '@tanstack/react-query'; import { useNavigate } from 'react-router-dom'; import useIntersect from 'shared/hooks/useIntersection'; +import { getDatesFromPeriod } from 'shared/utils/period'; import RecruitItem from '@/pages/volunteers/_components/RecruitItem'; import recruitmentQueryOptions from '@/pages/volunteers/_queryOptions/recruitment'; import RecruitmentsSearchFilter from '@/pages/volunteers/search/_components/RecruitmentsSearchFilter'; import { useRecruitmentSearch } from '@/pages/volunteers/search/_hooks/useRecruitmentSearch'; import { SearchFilter } from '@/pages/volunteers/search/_types/filter'; -import { getDatesFromPeriod } from '@/pages/volunteers/search/_utils/period'; import { RecruitmentSearchFilter } from '@/types/apis/recruitment'; const getVolunteerSearchRequestFilter = ( diff --git a/apps/volunteer/src/pages/volunteers/_components/VolunteerRecruitItem.tsx b/apps/volunteer/src/pages/volunteers/_components/VolunteerRecruitItem.tsx index 22fbff9e..2e9ab867 100644 --- a/apps/volunteer/src/pages/volunteers/_components/VolunteerRecruitItem.tsx +++ b/apps/volunteer/src/pages/volunteers/_components/VolunteerRecruitItem.tsx @@ -2,6 +2,7 @@ import { AspectRatio, Box, Flex, Image, Text, VStack } from '@chakra-ui/react'; import { MouseEvent } from 'react'; import ApplicantStatus from 'shared/components/ApplicantStatus'; import InfoSubText from 'shared/components/InfoSubtext'; +import Label from 'shared/components/Label'; import LabelText from 'shared/components/LabelText'; type Recruitment = { @@ -9,8 +10,9 @@ type Recruitment = { title: string; shelterName: string; shelterProfileImage: string; + isRecruitmentClosed: boolean; volunteerDate: string; - volunteerDateDday: number; + volunteerDateDday: string; applicantCount: number; recruitmentCapacity: number; }; @@ -29,6 +31,7 @@ export default function VolunteerRecruitItem({ title, shelterName, shelterProfileImage, + isRecruitmentClosed, volunteerDate, volunteerDateDday, applicantCount, @@ -49,7 +52,15 @@ export default function VolunteerRecruitItem({ - + {isRecruitmentClosed ? ( +