Skip to content

Commit

Permalink
feat(client): 채용 공고 정보가 없을때 처리 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
SEOKKAMONI committed Jun 2, 2024
1 parent f29e08f commit 3f2a59f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
8 changes: 5 additions & 3 deletions apps/client/src/components/profile/ProfileList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ const ProfileList = ({ major, isRecruited, cardinal }: ProfileListProps) => {
}
});

return !isEmpty(filteredProfileList) ? (
if (isEmpty(filteredProfileList)) {
return <Text fontType="h4">앗! 해당 분야의 학생이 없어요...</Text>;
}

return (
<StyledProfileList>
{filteredProfileList.map((profile) => (
<ProfileCard
Expand All @@ -46,8 +50,6 @@ const ProfileList = ({ major, isRecruited, cardinal }: ProfileListProps) => {
/>
))}
</StyledProfileList>
) : (
<Text fontType="h4">앗! 해당 분야의 학생이 없어요...</Text>
);
};

Expand Down
17 changes: 17 additions & 0 deletions apps/client/src/components/recurit/RecuritList/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
import styled from '@emotion/styled';
import { Text } from '@sickgyun/ui';
import { isEmpty } from 'lodash';
import RecuritCard from '../RecuritCard';
import { withSuspense } from '@/hocs/withSuspense';
import { useGetRecuritList } from '@/hooks/api/recruit/useGetRecuritList';

const RecuritList = () => {
const { recuritList } = useGetRecuritList();

if (isEmpty(recuritList)) {
return (
<StyledFullHeight>
<Text fontType="h4">앗! 채용 공고에 대한 정보가 없어요...</Text>
</StyledFullHeight>
);
}

return (
<StyledRecuritList>
{recuritList.map((recurit) => (
Expand All @@ -29,3 +39,10 @@ const StyledRecuritList = styled.div`
gap: 24px;
height: 300px;
`;

const StyledFullHeight = styled.div`
display: flex;
align-items: center;
justify-content: center;
height: 100%;
`;

0 comments on commit 3f2a59f

Please sign in to comment.