Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[운영배포] 공연 내용 전체보기 클릭 시, 공연 정보 탭 아래가 아닌 전체 영역에 공연 내용이 표시되도록 수정 #224

Merged
merged 2 commits into from
Oct 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 4 additions & 18 deletions packages/ui/src/components/ShowPreview/ShowInfoDetail.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import Linkify from 'linkify-react';
import Styled from './ShowPreview.styles';
import { CallIcon, MessageIcon } from '@boolti/icon';
import { useState } from 'react';
import ShowPreviewNotice from './ShowPreviewNotice';

interface Props {
show: {
Expand All @@ -23,6 +21,7 @@ interface Props {
hasNoticePage?: boolean;
onClickLink?: () => void;
onClickLinkMobile?: () => void;
onClickViewNotice?: () => void;
}

const ShowInfoDetail = ({
Expand All @@ -39,19 +38,8 @@ const ShowInfoDetail = ({
hasNoticePage,
onClickLink,
onClickLinkMobile,
onClickViewNotice,
}: Props) => {
const [noticeOpen, setNoticeOpen] = useState<boolean>(false);
if (noticeOpen) {
return (
<ShowPreviewNotice
notice={notice}
onClickBackButton={() => {
setNoticeOpen(false);
}}
/>
);
}

return (
<Styled.ShowInfo>
<Styled.ShowInfoGroup>
Expand Down Expand Up @@ -115,9 +103,7 @@ const ShowInfoDetail = ({
{hasNoticePage && (
<Styled.ShowInfoTitleTextButton
type="button"
onClick={() => {
setNoticeOpen(true);
}}
onClick={onClickViewNotice}
>
전체보기
</Styled.ShowInfoTitleTextButton>
Expand All @@ -134,7 +120,7 @@ const ShowInfoDetail = ({
</Styled.ShowInfoGroup>
<Styled.ShowInfoGroup>
<Styled.ShowInfoTitleContainer>
<Styled.ShowInfoTitle>공연 관리 문의</Styled.ShowInfoTitle>
<Styled.ShowInfoTitle>공연 관련 문의</Styled.ShowInfoTitle>
</Styled.ShowInfoTitleContainer>
<Styled.ShowHost>
<Styled.ShowHostName>{hostName}</Styled.ShowHostName>
Expand Down
18 changes: 18 additions & 0 deletions packages/ui/src/components/ShowPreview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import Tab from '../Tab';
import ShowCastInfo from './ShowCastInfo';
import ShowInfoDetail from './ShowInfoDetail';
import ShowTicketPeriod from './ShowTicketPeriod';
import { useState } from 'react';
import ShowPreviewNotice from './ShowPreviewNotice';

interface ShowPreviewProps {
show: {
Expand Down Expand Up @@ -49,6 +51,19 @@ const ShowPreview = ({
}: ShowPreviewProps) => {
const { images, name, salesStartTime, salesEndTime } = show;

const [noticeOpen, setNoticeOpen] = useState<boolean>(false);

if (noticeOpen) {
return (
<ShowPreviewNotice
notice={show.notice}
onClickBackButton={() => {
setNoticeOpen(false);
}}
/>
);
}

return (
<Styled.ShowPreview>
<Styled.ShowPreviewHeader>
Expand Down Expand Up @@ -84,6 +99,9 @@ const ShowPreview = ({
hasNoticePage={hasNoticePage}
onClickLink={onClickLink}
onClickLinkMobile={onClickLinkMobile}
onClickViewNotice={() => {
setNoticeOpen(true);
}}
/>
),
},
Expand Down
Loading