Skip to content

Commit d903d96

Browse files
authored
Merge pull request #292 from Nexters/bugfix/preview-qa
공연 미리보기 디자인 QA 반영
2 parents b34e19d + 10ee0ea commit d903d96

File tree

7 files changed

+53
-40
lines changed

7 files changed

+53
-40
lines changed

apps/preview/src/pages/ShowInfoDetailPage/index.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ const ShowInfoDetailPage: React.FC = () => {
4747
longitude,
4848
}}
4949
soldTicketCount={soldTicketCount}
50+
isAppWebview
5051
onClickCallLink={callLinkClickHandler}
5152
onClickMessageLink={messageLinkClickHandler}
5253
onClickCallLinkMobile={callLinkClickHandler}
2.86 KB
Loading

packages/ui/src/components/PreviewMap/PreviewMap.styles.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import styled from '@emotion/styled';
22

3-
const Button = styled.button`
3+
const Button = styled.div`
44
position: absolute;
55
bottom: 12px;
66
right: 12px;
7-
cursor: pointer;
87
width: 32px;
98
height: 32px;
109
border-radius: 4px;

packages/ui/src/components/PreviewMap/index.tsx

+26-17
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,43 @@
1-
import { Container, NaverMap, useNavermaps } from 'react-naver-maps';
1+
import { Container, Marker, NaverMap, useNavermaps } from 'react-naver-maps';
22
import { checkIsAndroid, checkIsIOS, checkIsWebView } from '@boolti/bridge';
33

44
import Styled from './PreviewMap.styles';
55
import { CurvedArrowRightIcon } from '@boolti/icon';
66
import { useConfirm } from '../../hooks';
77

8+
import markerImageUrl from '../../assets/images/marker.png'
9+
10+
811
interface Props {
912
latitude: number;
1013
longitude: number;
1114
name: string;
15+
isAppWebview: boolean;
1216
}
1317

1418
const CONFIRM_LOCAL_STORAGE_KEY = 'BOOLTI_PREVIEW_MAP_OPEN_NAVER_MAP';
1519

16-
const PreviewMap = ({ latitude, longitude, name }: Props) => {
17-
const navermaps = useNavermaps();
20+
const PreviewMap = ({ latitude, longitude, name, isAppWebview }: Props) => {
1821
const confirm = useConfirm();
22+
const navermaps = useNavermaps();
1923

2024
const openNaverMaps = async () => {
2125
if (!localStorage.getItem(CONFIRM_LOCAL_STORAGE_KEY)) {
22-
const isConfirm = await confirm(
23-
<Styled.ConfirmText>
24-
길찾기를 위해{'\n'}네이버 지도앱으로 이동합니다.
25-
<Styled.ConfirmDescription>* 이 안내는 한 번만 표시됩니다.</Styled.ConfirmDescription>
26-
</Styled.ConfirmText>,
27-
{
28-
cancel: '취소하기',
29-
confirm: '이동하기',
30-
},
31-
);
26+
if (!isAppWebview) {
27+
const isConfirm = await confirm(
28+
<Styled.ConfirmText>
29+
길찾기를 위해{'\n'}네이버 지도로 이동합니다.
30+
<Styled.ConfirmDescription>* 이 안내는 한 번만 표시됩니다.</Styled.ConfirmDescription>
31+
</Styled.ConfirmText>,
32+
{
33+
cancel: '취소하기',
34+
confirm: '이동하기',
35+
},
36+
);
3237

33-
if (!isConfirm) {
34-
return;
38+
if (!isConfirm) {
39+
return;
40+
}
3541
}
3642

3743
localStorage.setItem(CONFIRM_LOCAL_STORAGE_KEY, new Date().valueOf().toString());
@@ -69,6 +75,7 @@ const PreviewMap = ({ latitude, longitude, name }: Props) => {
6975
zIndex: 0,
7076
borderRadius: 8,
7177
}}
78+
onClick={openNaverMaps}
7279
>
7380
<NaverMap
7481
draggable={false}
@@ -85,8 +92,10 @@ const PreviewMap = ({ latitude, longitude, name }: Props) => {
8592
mapTypeControl={false}
8693
zoom={18}
8794
defaultCenter={new navermaps.LatLng(latitude, longitude)}
88-
/>
89-
<Styled.Button onClick={openNaverMaps}>
95+
>
96+
<Marker position={new navermaps.LatLng(latitude, longitude)} icon={{ url: markerImageUrl, size: { width: 48, height: 61 } }} />
97+
</NaverMap>
98+
<Styled.Button>
9099
<CurvedArrowRightIcon />
91100
</Styled.Button>
92101
</Container>

packages/ui/src/components/ShowPreview/ShowCastInfo.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const ShowCastInfo = ({ showCastTeams }: Props) => {
1616
<Styled.CastInfo>
1717
{showCastTeams.length > 0 ? (
1818
showCastTeams.map((team, teamIndex) => (
19-
<Styled.ShowInfoGroup key={teamIndex} type="small">
19+
<Styled.ShowInfoGroup key={teamIndex}>
2020
<Styled.ShowInfoTitleContainer>
2121
<Styled.ShowInfoTitle>{team.name}</Styled.ShowInfoTitle>
2222
</Styled.ShowInfoTitleContainer>

packages/ui/src/components/ShowPreview/ShowInfoDetail.tsx

+12-10
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ interface Props {
2121
longitude?: number;
2222
};
2323
soldTicketCount?: number;
24+
isAppWebview?: boolean
2425
onClickCallLink?: () => void;
2526
onClickMessageLink?: () => void;
2627
onClickCallLinkMobile?: () => void;
@@ -42,6 +43,7 @@ const ShowInfoDetail = ({
4243
detailAddress,
4344
},
4445
soldTicketCount,
46+
isAppWebview = false,
4547
onClickCallLink,
4648
onClickMessageLink,
4749
onClickCallLinkMobile,
@@ -81,8 +83,16 @@ const ShowInfoDetail = ({
8183
<Styled.ShowInfoDescription>
8284
{salesStartTime} - {salesEndTime}
8385
</Styled.ShowInfoDescription>
86+
{isEnded && soldTicketCount !== undefined && (
87+
<Styled.ShowTicketInfoDescription>
88+
<Styled.TicketIcon>
89+
<TicketIcon />
90+
</Styled.TicketIcon>{' '}
91+
{soldTicketCount}매 판매 완료
92+
</Styled.ShowTicketInfoDescription>
93+
)}
8494
</Styled.ShowInfoGroup>
85-
<Styled.ShowInfoGroup style={{ paddingBottom: isOverflow ? '0' : '32px' }}>
95+
<Styled.ShowInfoGroup style={{ paddingBottom: isOverflow ? '0' : '24px' }}>
8696
<Styled.ShowInfoTitleContainer>
8797
<Styled.ShowInfoTitle>내용</Styled.ShowInfoTitle>
8898
</Styled.ShowInfoTitleContainer>
@@ -122,15 +132,7 @@ const ShowInfoDetail = ({
122132
</Styled.ShowInfoDescriptionText>
123133
</Styled.ShowInfoDescription>
124134
{latitude && longitude && (
125-
<PreviewMap latitude={latitude} longitude={longitude} name={placeName} />
126-
)}
127-
{isEnded && soldTicketCount !== undefined && (
128-
<Styled.ShowTicketInfoDescription>
129-
<Styled.TicketIcon>
130-
<TicketIcon />
131-
</Styled.TicketIcon>{' '}
132-
{soldTicketCount}매 판매 완료
133-
</Styled.ShowTicketInfoDescription>
135+
<PreviewMap latitude={latitude} longitude={longitude} name={placeName} isAppWebview={isAppWebview} />
134136
)}
135137
</Styled.ShowInfoGroup>
136138
<Styled.ShowInfoGroup>

packages/ui/src/components/ShowPreview/ShowPreview.styles.ts

+12-10
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ const ShowPreviewHeader = styled.div`
1717
padding-bottom: 32px;
1818
display: flex;
1919
flex-direction: column;
20-
gap: 16px;
2120
background: ${({ theme }) => theme.palette.mobile.grey.g90};
2221
border-bottom-left-radius: 20px;
2322
border-bottom-right-radius: 20px;
@@ -43,8 +42,7 @@ const ShowPreviewNavbar = styled.div`
4342
display: flex;
4443
justify-content: space-between;
4544
align-items: center;
46-
height: 44px;
47-
padding: 0 20px;
45+
padding: 22px 20px 10px;
4846
background-color: ${({ theme }) => theme.palette.mobile.grey.g90};
4947
`;
5048

@@ -79,7 +77,8 @@ const ShowImage = styled.img`
7977
const ShowName = styled.h2`
8078
${({ theme }) => theme.typo.point.p3};
8179
color: ${({ theme }) => theme.palette.mobile.grey.g05};
82-
text-align: center;
80+
margin-top: 24px;
81+
margin-bottom: 12px;
8382
`;
8483

8584
const ShowHeaderInfoList = styled.div`
@@ -165,14 +164,16 @@ const ShowPreviewTicketPeriodText = styled.p`
165164
color: ${({ theme }) => theme.palette.mobile.grey.g30};
166165
`;
167166

168-
const ShowInfo = styled.div``;
167+
const ShowInfo = styled.div`
168+
padding: 8px 0;
169+
`;
169170

170171
const CastInfo = styled.div`
171172
padding-bottom: 16px;
172173
`;
173174

174-
const ShowInfoGroup = styled.div<{ type?: 'small' | 'normal' }>`
175-
padding: ${({ type = 'normal' }) => (type === 'normal' ? '32px 0' : '24px 0')};
175+
const ShowInfoGroup = styled.div`
176+
padding: 24px 0;
176177
border-bottom: 1px solid ${({ theme }) => theme.palette.mobile.grey.g85};
177178
178179
&:last-of-type {
@@ -186,7 +187,7 @@ const ShowInfoTitleContainer = styled.div`
186187
align-items: center;
187188
188189
&:not(:last-child) {
189-
margin-bottom: 16px;
190+
margin-bottom: 12px;
190191
}
191192
`;
192193

@@ -200,7 +201,7 @@ const ShowInfoMoreButton = styled.button`
200201
justify-content: center;
201202
align-items: center;
202203
width: 100%;
203-
padding: 10px 0 32px;
204+
padding: 10px 0 24px;
204205
text-align: center;
205206
${({ theme }) => theme.typo.sh1};
206207
color: ${({ theme }) => theme.palette.mobile.grey.g10};
@@ -284,7 +285,8 @@ const ShowInfoDescriptionBadge = styled.div`
284285
border: 1px solid ${({ theme }) => theme.palette.mobile.grey.g50};
285286
${({ theme }) => theme.typo.c1};
286287
color: ${({ theme }) => theme.palette.mobile.grey.g30};
287-
padding: 3px 8px;
288+
padding: 0 8px;
289+
height: 22px;
288290
border-radius: 999px;
289291
position: relative;
290292
top: -1.5px;

0 commit comments

Comments
 (0)