build link

mail@pastecode.io avatar
unknown
javascript
a year ago
657 B
5
Indexable
Never
import dynamicLinks from '@react-native-firebase/dynamic-links';
export const buildLinkInviteByLixi = async (user_name, user_id, lixi_id) => {
  try {
    const link = await dynamicLinks().buildShortLink({
      link: `https://signup.goonus.io/${user_id}?ref_id=${user_name}&lixi_id=${lixi_id}`,
      domainUriPrefix: 'https://onus.page.link',
      android: {
        packageName: 'com.vndc',
      },
      ios: {
        bundleId: 'com.vndc.app',
        appStoreId: '1498452975',
        customScheme: 'vndcapp',
      },
    });
    console.log('link', link);
    return link;
  } catch (error) {
    console.log('error', error);
    return '';
  }
};