Skip to content

Commit 3f2a59f

Browse files
committed
feat(client): 채용 공고 정보가 없을때 처리 추가
1 parent f29e08f commit 3f2a59f

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

apps/client/src/components/profile/ProfileList/index.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ const ProfileList = ({ major, isRecruited, cardinal }: ProfileListProps) => {
2727
}
2828
});
2929

30-
return !isEmpty(filteredProfileList) ? (
30+
if (isEmpty(filteredProfileList)) {
31+
return <Text fontType="h4">앗! 해당 분야의 학생이 없어요...</Text>;
32+
}
33+
34+
return (
3135
<StyledProfileList>
3236
{filteredProfileList.map((profile) => (
3337
<ProfileCard
@@ -46,8 +50,6 @@ const ProfileList = ({ major, isRecruited, cardinal }: ProfileListProps) => {
4650
/>
4751
))}
4852
</StyledProfileList>
49-
) : (
50-
<Text fontType="h4">앗! 해당 분야의 학생이 없어요...</Text>
5153
);
5254
};
5355

apps/client/src/components/recurit/RecuritList/index.tsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
11
import styled from '@emotion/styled';
2+
import { Text } from '@sickgyun/ui';
3+
import { isEmpty } from 'lodash';
24
import RecuritCard from '../RecuritCard';
35
import { withSuspense } from '@/hocs/withSuspense';
46
import { useGetRecuritList } from '@/hooks/api/recruit/useGetRecuritList';
57

68
const RecuritList = () => {
79
const { recuritList } = useGetRecuritList();
810

11+
if (isEmpty(recuritList)) {
12+
return (
13+
<StyledFullHeight>
14+
<Text fontType="h4">앗! 채용 공고에 대한 정보가 없어요...</Text>
15+
</StyledFullHeight>
16+
);
17+
}
18+
919
return (
1020
<StyledRecuritList>
1121
{recuritList.map((recurit) => (
@@ -29,3 +39,10 @@ const StyledRecuritList = styled.div`
2939
gap: 24px;
3040
height: 300px;
3141
`;
42+
43+
const StyledFullHeight = styled.div`
44+
display: flex;
45+
align-items: center;
46+
justify-content: center;
47+
height: 100%;
48+
`;

0 commit comments

Comments
 (0)