Skip to content

Commit c87d228

Browse files
authored
Merge pull request #329 from Nexters/develop
[운영배포] 스토어 이동은 함수 호출 결과를 확인 후 진행
2 parents 610cc32 + e619a0c commit c87d228

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export const SCHEMES = {
2+
선물_등록: (giftId: string) => `boolti:///gift/${giftId}`,
3+
};

apps/admin/src/pages/GiftRegisterPage/components/GiftInformation/index.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import { useDeviceWidth } from '~/hooks/useDeviceWidth';
99
import { useTheme } from '@emotion/react';
1010
import { LINK } from '~/constants/link';
1111
import { navigateToAppScheme } from '~/utils/app';
12+
import { SCHEMES } from '~/constants/schemes';
13+
import { openStoreLink } from '~/utils/link';
1214

1315
const GiftInformation = () => {
1416
const { giftId = '' } = useParams<{ giftId: string }>();
@@ -53,7 +55,11 @@ const GiftInformation = () => {
5355
return;
5456
}
5557

56-
navigateToAppScheme(`boolti://gift/${giftId}`);
58+
const success = navigateToAppScheme(SCHEMES.선물_등록(giftId));
59+
60+
if (!success) {
61+
openStoreLink();
62+
}
5763
};
5864

5965
return (

apps/admin/src/utils/app.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { openStoreLink } from './link';
2-
31
export const navigateToAppScheme = async (appScheme: string) => {
42
let timerId: ReturnType<typeof setTimeout>;
53

@@ -34,8 +32,6 @@ export const navigateToAppScheme = async (appScheme: string) => {
3432

3533
if (elapsedTime < 1_500) {
3634
resolve(false);
37-
38-
openStoreLink();
3935
} else {
4036
resolve(false);
4137
}

0 commit comments

Comments
 (0)