Skip to content

Commit 5004f39

Browse files
authored
Merge pull request #4 from software-mansion-labs/feat/replace-api-url-and-cleanup
feat/replace-api-url-and-cleanup
2 parents cb97146 + bfd717f commit 5004f39

4 files changed

Lines changed: 6 additions & 8 deletions

File tree

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@
4747
],
4848
"repository": {
4949
"type": "git",
50-
"url": "git+https://github.com/detour-app/detour.git"
50+
"url": "git+https://github.com/software-mansion-labs/detour-website.git"
5151
},
52-
"author": "swmansion <kamil.sikora@swmansion.com> (https://godetour.dev/)",
52+
"author": "swmansion <contact@godetour.com> (https://godetour.dev/)",
5353
"license": "MIT",
5454
"bugs": {
5555
"url": "https://github.com/detour-app/detour/issues"
5656
},
57-
"homepage": "https://github.com/detour-app/detour#readme",
57+
"homepage": "https://github.com/software-mansion-labs/detour-website#readme",
5858
"publishConfig": {
5959
"registry": "https://registry.npmjs.org/"
6060
},

src/api/getDeferredLink.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { RequiredConfig } from '../types';
22
import { getProbabilisticFingerprint } from '../utils/fingerprint';
33

4-
const API_URL = 'https://godetour.dev/api/link/match-link';
4+
const API_URL = 'https://detour-poc.vercel.app/api/link/match-link';
55

66
export const getDeferredLink = async ({
77
API_KEY,

src/hooks/useDeferredLink.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ export const useDeferredLink = ({
1717
const [route, setRoute] = useState<string | null>(null);
1818

1919
useEffect(() => {
20+
if (!API_KEY || !appID) return;
21+
2022
(async () => {
2123
if (deferredSessionHandled) {
2224
setDeferredProcessed(true);
@@ -27,7 +29,6 @@ export const useDeferredLink = ({
2729

2830
const isFirstEntrance = await checkIsFirstEntrance();
2931
if (!isFirstEntrance) {
30-
console.log('Not the first entrance, skipping deferred link fetch');
3132
setDeferredProcessed(true);
3233
return;
3334
} else {
@@ -40,7 +41,6 @@ export const useDeferredLink = ({
4041
shouldUseClipboard,
4142
});
4243
if (!link) {
43-
console.log('No deferred link found');
4444
setDeferredProcessed(true);
4545
setMatchedLink(null);
4646
return;

src/utils/fingerprint.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ type ProbabilisticFingerprint = {
1414
locale: Localization.Locale[];
1515
timezone: string | null | undefined;
1616
userAgent: string;
17-
appVersion: string;
1817
timestamp: number;
1918
pastedLink?: string;
2019
};
@@ -35,7 +34,6 @@ export const getProbabilisticFingerprint = async (
3534
locale: Localization.getLocales(),
3635
timezone: Localization.getCalendars()[0]?.timeZone,
3736
userAgent: await DeviceInfo.getUserAgent(),
38-
appVersion: DeviceInfo.getVersion(),
3937
timestamp: Date.now(),
4038
pastedLink: shouldUseClipboard
4139
? await Clipboard.getStringAsync()

0 commit comments

Comments
 (0)