Skip to content

Commit

Permalink
feat(link): add link
Browse files Browse the repository at this point in the history
  • Loading branch information
deli-ght committed Aug 7, 2023
1 parent 1294111 commit 80f413b
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions apps/onboarding/src/app/result/components/ResultContents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,22 @@ export const ResultContents = () => {
return;
}

const deep_link =
'intent://measuring/#Intent;scheme=sulsul;package=com.mashup.alcoholfree;end';
const checkAndroid = () => {
const u = navigator.userAgent;
return !!u.match(/Android/i);
};

router.push(deep_link);
if (checkAndroid()) {
const deep_link =
'intent://measuring/#Intent;scheme=sulsul;package=com.mashup.alcoholfree;end';

router.push(deep_link);
return;
}

router.push(
'https://play.google.com/store/apps/details?id=com.mashup.alcoholfree&hl=en-KR'
);
};

return (
Expand Down

0 comments on commit 80f413b

Please sign in to comment.