Skip to content

Commit

Permalink
[Fix/#305] 디자인 QA (#308)
Browse files Browse the repository at this point in the history
* feat: HostMyPage 엠티 뷰 그래픽 이미지 3배수로 추출 및 너비 조절

* feat: 공지사항 우상단 isPrivate에 따라 칩 추가

* feat: 필요없는 코드 제거

* feat: 참가자 마이 클래스에서 엠티 뷰일 때에는 FilterSelect 안보이게
  • Loading branch information
ExceptAnyone authored and gudusol committed Sep 19, 2024
1 parent e431eee commit a4a4d35
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 14 deletions.
Binary file modified public/image/graphics/image_spicker_apply.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 8 additions & 1 deletion src/pages/class/components/NoticeCard/NoticeCard.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ export const noticeCardContainer = (theme: Theme) => css`
`;

export const profileWrapper = css`
${flexGenerator('row', 'flex-start')};
${flexGenerator('row', 'space-between', 'flex-start')};
width: 100%;
gap: 1.2rem;
`;

Expand All @@ -27,6 +28,7 @@ export const profileImage = css`

export const profileTextBox = css`
${flexGenerator('column', 'center', 'flex-start')};
margin-top: 0.4rem;
`;

export const profilePosition = (theme: Theme) => css`
Expand Down Expand Up @@ -97,3 +99,8 @@ export const noticeCommentNumber = (theme: Theme) => css`
color: ${theme.color.midgray2};
${theme.font['body04-m-12']};
`;

export const profileCardWrapper = css`
${flexGenerator('row', 'flex-start', 'center')}
gap:1.2rem
`;
41 changes: 32 additions & 9 deletions src/pages/class/components/NoticeCard/NoticeCard.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { IcSpickerMark, IcComment } from '@svg';
import { Label } from '@components';
import { IcSpickerMark, IcComment, IcLock, IcUnlock } from '@svg';
import { formatCreatedDate } from '@utils';

import {
Expand All @@ -19,6 +20,7 @@ import {
noticeComment,
noticeCommentNumber,
noticeWrapper,
profileCardWrapper,
} from './NoticeCard.style';

import { components } from '@schema';
Expand All @@ -31,20 +33,41 @@ interface NoticeCardProps {
}

const NoticeCard = ({ noticeData, onClick }: NoticeCardProps) => {
const { hostNickName, hostImageUrl, title, content, date, noticeImageUrl, commentNumber } =
noticeData;
const {
hostNickName,
hostImageUrl,
title,
content,
date,
noticeImageUrl,
commentNumber,
isPrivate,
} = noticeData;

return (
<article css={noticeCardContainer} onClick={onClick}>
<section css={profileWrapper}>
<img css={profileImage} src={hostImageUrl} alt={`${hostNickName}의 프로필`} />
<div css={profileTextBox}>
<span css={profilePosition}>스픽커</span>
<div css={profileHostInfo}>
<span css={profileName}>{hostNickName}</span>
<IcSpickerMark css={porfileHostMark} />
<div css={profileCardWrapper}>
<img css={profileImage} src={hostImageUrl} alt={`${hostNickName}의 프로필`} />
<div css={profileTextBox}>
<span css={profilePosition}>스픽커</span>
<div css={profileHostInfo}>
<span css={profileName}>{hostNickName}</span>
<IcSpickerMark css={porfileHostMark} />
</div>
</div>
</div>
<div>
{isPrivate ? (
<Label variant="category" icon={<IcLock />}>
참가자
</Label>
) : (
<Label variant="category" icon={<IcUnlock />}>
전체
</Label>
)}
</div>
</section>
<section css={noticeWrapper}>
<h3 css={noticeTitle}>{title}</h3>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/guest/page/GuestMyClass/GuestMyClass.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const GuestMyClass = () => {
</article>

<main css={mainWrapper}>
{activeTab === '신청한' && (
{activeTab === '신청한' && (currentData?.length ?? 0) > 0 && (
<article css={filterSelectWrapper}>
<div css={filterSelectStyle}>
<FilterSelect
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { Theme, css } from '@emotion/react';
import { flexGenerator } from '@styles/generator';

export const hostMyPageEmptyViewContainer = css`
height: calc(100dvh - 12.55rem);
${flexGenerator('column')};
margin-top: 10.1rem;
width: 100%;
gap: 2rem;
`;
Expand All @@ -28,6 +28,7 @@ export const textWrapper = css`
`;

export const buttonWrapper = css`
width: 100%;
padding: 0 9.3rem;
${flexGenerator('row', 'center', ' center')};
width: 17.7rem;
gap: 1rem;
`;

0 comments on commit a4a4d35

Please sign in to comment.