diff --git a/apps/preview/src/App.tsx b/apps/preview/src/App.tsx
index 5460e230..016d769c 100644
--- a/apps/preview/src/App.tsx
+++ b/apps/preview/src/App.tsx
@@ -9,7 +9,7 @@ import { HelmetProvider } from 'react-helmet-async';
import ShowPreviewPage from './pages/ShowPreviewPage';
import { fetcher } from '@boolti/api/src/fetcher';
import NotFound from './components/NotFound';
-import ShowPreviewNoticePage from './pages/ShowPreviewNoticePage';
+import ShowInfoDetailPage from './pages/ShowInfoDetailPage';
const router = createBrowserRouter([
{
@@ -28,12 +28,16 @@ const router = createBrowserRouter([
errorElement: ,
},
{
- path: '/show/:showId/notice',
- element: ,
+ path: '/show/:showId/info',
+ element: ,
loader: async ({ params }) => {
const showId = params.showId;
if (showId) {
- return await fetcher.get(`web/papi/v1/shows/${showId}`);
+ const response = await Promise.all([
+ fetcher.get(`web/papi/v1/shows/${showId}`),
+ fetcher.get<{ count: number }>(`web/papi/v1/shows/${showId}/sold-ticket-counts`),
+ ])
+ return response;
}
},
errorElement: ,
diff --git a/apps/preview/src/pages/ShowInfoDetailPage/ShowInfoDetailPage.styles.ts b/apps/preview/src/pages/ShowInfoDetailPage/ShowInfoDetailPage.styles.ts
new file mode 100644
index 00000000..5d3635ca
--- /dev/null
+++ b/apps/preview/src/pages/ShowInfoDetailPage/ShowInfoDetailPage.styles.ts
@@ -0,0 +1,10 @@
+import styled from '@emotion/styled'
+
+const Container = styled.div`
+ background-color : ${({ theme }) => theme.palette.mobile.grey.g95};
+ padding: 0 20px;
+`
+
+export default {
+ Container,
+}
diff --git a/apps/preview/src/pages/ShowInfoDetailPage/index.tsx b/apps/preview/src/pages/ShowInfoDetailPage/index.tsx
new file mode 100644
index 00000000..71daf510
--- /dev/null
+++ b/apps/preview/src/pages/ShowInfoDetailPage/index.tsx
@@ -0,0 +1,46 @@
+import { ShowPreviewResponse } from "@boolti/api";
+import { ShowInfoDetail } from "@boolti/ui";
+import { format } from "date-fns";
+import { useLoaderData } from "react-router-dom";
+import Styled from './ShowInfoDetailPage.styles';
+
+const ShowInfoDetailPage: React.FC = () => {
+ const [show, { count: soldTicketCount }] = useLoaderData() as ShowPreviewResponse;
+
+ const {
+ notice,
+ salesEndTime,
+ salesStartTime,
+ hostName,
+ isEnded
+ } = show;
+
+ const callLinkClickHandler = () => {
+ location.href = `tel:${show.hostPhoneNumber}`;
+ }
+
+ const messageLinkClickHandler = () => {
+ location.href = `sms:${show.hostPhoneNumber}`;
+ }
+
+ return (
+
+
+
+ );
+}
+
+export default ShowInfoDetailPage;
diff --git a/apps/preview/src/pages/ShowPreviewNoticePage/index.tsx b/apps/preview/src/pages/ShowPreviewNoticePage/index.tsx
deleted file mode 100644
index 092ce917..00000000
--- a/apps/preview/src/pages/ShowPreviewNoticePage/index.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ShowPreviewResponse } from "@boolti/api";
-import { ShowContentMarkdown } from "@boolti/ui";
-import { Helmet } from "react-helmet-async";
-import { useLoaderData } from "react-router-dom";
-
-const ShowPreviewNoticePage: React.FC = () => {
- const { notice } = useLoaderData() as ShowPreviewResponse;
-
- return (
- <>
-
-
-
-
- >
- );
-}
-
-export default ShowPreviewNoticePage;
diff --git a/packages/icon/src/components/Tickets.tsx b/packages/icon/src/components/Tickets.tsx
new file mode 100644
index 00000000..e69de29b
diff --git a/packages/ui/src/components/ShowPreview/ShowInfoDetail.tsx b/packages/ui/src/components/ShowPreview/ShowInfoDetail.tsx
index e4bd4e08..5c452a48 100644
--- a/packages/ui/src/components/ShowPreview/ShowInfoDetail.tsx
+++ b/packages/ui/src/components/ShowPreview/ShowInfoDetail.tsx
@@ -1,46 +1,39 @@
import Styled from './ShowPreview.styles';
-import { CallIcon, MessageIcon } from '@boolti/icon';
+import { CallIcon, MessageIcon, TicketIcon } from '@boolti/icon';
import ShowInfoDescription from '../ShowContentMarkdown';
interface Props {
show: {
- images: string[];
- name: string;
- date: string;
- startTime: string;
- runningTime: string;
salesStartTime: string;
salesEndTime: string;
- placeName: string;
- placeStreetAddress: string;
- placeDetailAddress: string;
notice: string;
hostName: string;
- hostPhoneNumber: string;
+ isEnded: boolean;
};
+ soldTicketCount?: number;
hasNoticePage?: boolean;
- onClickLink?: () => void;
- onClickLinkMobile?: () => void;
+ onClickCallLink?: () => void;
+ onClickMessageLink?: () => void;
+ onClickCallLinkMobile?: () => void;
+ onClickMessageLinkMobile?: () => void;
onClickViewNotice?: () => void;
}
const ShowInfoDetail = ({
show: {
- // date,
- // startTime,
- // runningTime,
salesStartTime,
salesEndTime,
- // placeName,
- // placeStreetAddress,
- // placeDetailAddress,
notice,
hostName,
+ isEnded,
},
+ soldTicketCount,
hasNoticePage,
- onClickLink,
- onClickLinkMobile,
+ onClickCallLink,
+ onClickMessageLink,
+ onClickCallLinkMobile,
+ onClickMessageLinkMobile,
onClickViewNotice,
}: Props) => {
return (
@@ -52,6 +45,13 @@ const ShowInfoDetail = ({
{salesStartTime} - {salesEndTime}
+ {isEnded && soldTicketCount !== undefined && (
+
+
+
+ {soldTicketCount}매 판매 완료
+
+ )}
@@ -73,18 +73,18 @@ const ShowInfoDetail = ({
{hostName}
-
+
-
+
-
+
-
+
diff --git a/packages/ui/src/components/ShowPreview/ShowPreview.styles.ts b/packages/ui/src/components/ShowPreview/ShowPreview.styles.ts
index 6546b800..ddc6344e 100644
--- a/packages/ui/src/components/ShowPreview/ShowPreview.styles.ts
+++ b/packages/ui/src/components/ShowPreview/ShowPreview.styles.ts
@@ -226,6 +226,8 @@ const ShowInfoDescription = styled.div`
color: ${({ theme }) => theme.palette.mobile.grey.g30};
overflow-wrap: break-word;
word-break: break-word;
+ display: flex;
+ align-items: center;
${({ isFullContent }) =>
isFullContent &&
@@ -238,6 +240,23 @@ const ShowInfoDescription = styled.div`
`}
`;
+const ShowTicketInfoDescription = styled.div`
+ ${({ theme }) => theme.typo.b3};
+ color: ${({ theme }) => theme.palette.mobile.grey.g30};
+ overflow-wrap: break-word;
+ word-break: break-word;
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ margin-top: 4px;
+`;
+
+const TicketIcon = styled.div`
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+`
+
const ShowInfoDescriptionBadge = styled.div`
display: inline-flex;
align-items: center;
@@ -398,6 +417,8 @@ export default {
ShowInfoTitleTextButton,
ShowInfoSubtitle,
ShowInfoDescription,
+ ShowTicketInfoDescription,
+ TicketIcon,
ShowInfoDescriptionBadge,
ShowInfoBox,
ShowHost,
diff --git a/packages/ui/src/components/ShowPreview/index.tsx b/packages/ui/src/components/ShowPreview/index.tsx
index dbe56166..32f2c307 100644
--- a/packages/ui/src/components/ShowPreview/index.tsx
+++ b/packages/ui/src/components/ShowPreview/index.tsx
@@ -130,8 +130,10 @@ const ShowPreview = ({
{
containerScrollTop.current = containerRef?.current?.scrollTop ?? null;
containerRef?.current?.scrollTo(0, 0);
diff --git a/packages/ui/src/components/index.ts b/packages/ui/src/components/index.ts
index 42427289..8042f103 100644
--- a/packages/ui/src/components/index.ts
+++ b/packages/ui/src/components/index.ts
@@ -16,6 +16,7 @@ import StepProgressBar from './StepProgressBar';
import Checkbox from './Checkbox';
import StepDialog from './Dialog/StepDialog';
import ShowContentMarkdown from './ShowContentMarkdown';
+import ShowInfoDetail from './ShowPreview/ShowInfoDetail';
export {
AgreeCheck,
@@ -35,5 +36,6 @@ export {
StepProgressBar,
Checkbox,
StepDialog,
- ShowContentMarkdown
+ ShowContentMarkdown,
+ ShowInfoDetail,
};