Skip to content

Commit

Permalink
feat/#55 : 궁금한 작가 없는 경우
Browse files Browse the repository at this point in the history
  • Loading branch information
moondda committed Jan 11, 2024
1 parent 39fa42c commit 8a6dc52
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 24 deletions.
54 changes: 39 additions & 15 deletions src/pages/groupFeed/CuriousProfile.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import styled from '@emotion/styled';

import { CURIOUS_PROFILE } from './constants/CURIOUS_PROFILE';
import { GroupCuriousProfileOpenIc } from '../../assets/svgs';
import { GroupCuriousProfileOpenIc, GroupNoDataImgIc } from '../../assets/svgs';
import Spacing from '../../components/commons/Spacing';

interface ProfilePropTypes {
writerName: string;
Expand All @@ -11,21 +12,31 @@ interface ProfilePropTypes {
const CuriousProfile = () => {
return (
<CuriousProfileWrapper>
{CURIOUS_PROFILE.popularWriters.map((writer, index) => (
<CuriousProfileLayout key={index}>
<GroupCuriousProfileOpenIc />
<ProfileWrapper>
{writer.information == '' ? (
<ProfileTitle>{writer.writerName}</ProfileTitle>
) : (
<>
{CURIOUS_PROFILE.popularWriters.length == 0 ? (
<NoCuriousProfileeWrapper>
<Spacing marginBottom="4" />
<GroupNoDataImgIc />
<Spacing marginBottom="1.6" />
아직은 굼금해요를 많이 받은 작가가 없어요
<Spacing marginBottom="4" />
</NoCuriousProfileeWrapper>
) : (
CURIOUS_PROFILE.popularWriters.map((writer: ProfilePropTypes, index: number) => (
<CuriousProfileLayout key={index}>
<GroupCuriousProfileOpenIc />
<ProfileWrapper>
{writer.information == '' ? (
<ProfileTitle>{writer.writerName}</ProfileTitle>
<ProfileDetail>{writer.information}</ProfileDetail>
</>
)}
</ProfileWrapper>
</CuriousProfileLayout>
))}
) : (
<>
<ProfileTitle>{writer.writerName}</ProfileTitle>
<ProfileDetail>{writer.information}</ProfileDetail>
</>
)}
</ProfileWrapper>
</CuriousProfileLayout>
))
)}
</CuriousProfileWrapper>
);
};
Expand Down Expand Up @@ -69,3 +80,16 @@ const CuriousProfileLayout = styled.div`
${({ theme }) => theme.fonts.subtitle3};
`;

const NoCuriousProfileeWrapper = styled.div`
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 72rem;
height: 22rem;
color: ${({ theme }) => theme.colors.gray40};
${({ theme }) => theme.fonts.subtitle3};
`;
33 changes: 24 additions & 9 deletions src/pages/groupFeed/constants/CURIOUS_PROFILE.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,31 @@
export const CURIOUS_PROFILE = {
popularWriters: [
{
writerName: '짜미',
information: '',
},
{
writerName: '짜미2',
information: '작자미상의 짜미2입니다 !',
},
// {
// writerName: '짜미',
// information: '',
// },
// {
// writerName: '짜미2',
// information: '작자미상의 짜미2입니다 !',
// },
],
};

export const CURIOUS_ARTICLE = {
postList: [],
postList: [
// {
// postId: 1,
// imageUrl: '사진',
// topic: '글감1',
// title: '글 제목1',
// content: '글 내용1',
// },
// {
// postId: 2,
// imageUrl: '사진',
// topic: '글감2',
// title: '글 제목2',
// content: '글 내용2',
// },
],
};

0 comments on commit 8a6dc52

Please sign in to comment.