Skip to content

Commit 28c134f

Browse files
committed
fix: mobile 일때 앱 설치여부 확인하는 로직 변경
1 parent 72e7313 commit 28c134f

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

apps/profile/src/constants/schemes.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@ export function createAppScheme({ path, query }: SchemeOptions): string {
1919
export const SCHEMES = {
2020
: () => createAppScheme({ path: 'home' }),
2121
선물_등록: (giftId: string) => createAppScheme({ path: `gift/${giftId}` }),
22+
브릿지_스토어: () => createAppScheme({ path: 'bridge/store' }),
2223
};

apps/profile/src/pages/ProfilePage/index.tsx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,12 @@ import Styled, { bottomSheetOverrides } from './ProfilePage.styles';
1616
import Layout from '~/components/Layout';
1717
import { useUserByUserCodeV2 } from '@boolti/api';
1818
import { formatDateTimeWithWeekday, formatDateWithWeekday } from '~/utils';
19+
import { navigateToAppScheme } from '~/utils/app';
20+
import { openStoreLink } from '~/utils/link';
1921
import { Meta } from '~/components/Meta';
2022
import { PROFILE_URL } from '~/constants/url';
2123
import { EXTERNAL_URL } from '~/constants/external';
24+
import { SCHEMES } from '~/constants/schemes';
2225
import VideoCard from '~/components/VideoCard';
2326
import NotFound from '~/components/Notfound';
2427
import { QRCodeSVG } from 'qrcode.react';
@@ -89,8 +92,15 @@ const ProfilePage = () => {
8992
return url;
9093
};
9194

92-
const reservationButtonClickHandler = (isDesktop: boolean) => {
93-
if (!isDesktop) return;
95+
const reservationButtonClickHandler = async (isDesktop: boolean) => {
96+
if (!isDesktop) {
97+
const success = await navigateToAppScheme(SCHEMES.브릿지_스토어());
98+
99+
if (!success) {
100+
openStoreLink();
101+
}
102+
return;
103+
}
94104

95105
dialog.open({
96106
title: '불티 앱에서 프로필 만들기',
@@ -122,7 +132,6 @@ const ProfilePage = () => {
122132
const instagramAccount = profile.sns.find((sns) => sns.type === 'INSTAGRAM');
123133
const youtubeAccount = profile.sns.find((sns) => sns.type === 'YOUTUBE');
124134

125-
console.log(profile);
126135
return (
127136
<>
128137
<Global styles={bottomSheetOverrides} />

0 commit comments

Comments
 (0)