Skip to content

Commit

Permalink
design: #13 초대하기 버튼 이미지 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
JIN921 committed Jan 24, 2025
1 parent 9a68779 commit d49965f
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 4 deletions.
4 changes: 4 additions & 0 deletions src/assets/images/ic_invite_mail.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 23 additions & 4 deletions src/pages/MeetingDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Button from '@/components/common/Button/Button';
import Header from '@/components/common/Header/Header';
import MeetingDetailMain from '@/components/MeetingDetail/MeetingDetailMain';
import styled from 'styled-components';
import MailIcon from '@/assets/images/ic_invite_mail.svg';

const Container = styled.div`
margin: 0 auto;
Expand All @@ -20,6 +21,11 @@ const ButtonContainer = styled.div`
justify-content: center;
align-items: center;
`;
const Icon = styled.img`
width: 24px;
height: 24px;
display: block;
`;

const meetingMockData = {
title: '마라탕 맛나게 냠냠냠 ٩( ᐛ )و 모임',
Expand All @@ -32,7 +38,11 @@ const meetingMockData = {
chatTime: '30분',
};

const MeetingDetail = () => {
interface MeetingDetailProps {
isOwner: boolean; // 게시물 소유 여부를 판별할 prop 추가
}

const MeetingDetail = ({ isOwner }: MeetingDetailProps) => {
const handleLeave = () => {
alert('모임에서 나갔습니다.');
};
Expand All @@ -57,11 +67,20 @@ const MeetingDetail = () => {
/>
<ButtonContainer>
<Button variant="primary-outline" size="sm" rounded="sm">
<Icon src={MailIcon} alt="초대" />
초대하기
</Button>
<Button size="sm" rounded="sm">
수정하기
</Button>
{isOwner ? (
<>
<Button size="sm" rounded="sm">
수정하기
</Button>
</>
) : (
<Button size="sm" rounded="sm">
참여하기
</Button>
)}
</ButtonContainer>
</Container>
);
Expand Down

0 comments on commit d49965f

Please sign in to comment.