mirror of
https://github.com/rxliuli/apps.apple.com.git
synced 2026-03-23 07:29:41 +01:00
init commit
This commit is contained in:
13
src/utils/launch-client.ts
Normal file
13
src/utils/launch-client.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { platform } from '@amp/web-apps-utils';
|
||||
|
||||
const setupUrlForMac = (url: string) => {
|
||||
const incomingUrl = new URL(url);
|
||||
incomingUrl.searchParams.set('mt', '12');
|
||||
return incomingUrl.toString();
|
||||
};
|
||||
|
||||
export const launchAppOnMac = (url: string) => {
|
||||
const appUrl = setupUrlForMac(url);
|
||||
|
||||
platform.launchClient(appUrl, () => {});
|
||||
};
|
||||
Reference in New Issue
Block a user