Skip to content

Commit

Permalink
remove marfa
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohan-cp committed Oct 4, 2023
1 parent dd9123d commit 61a09d9
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions apps/mobile/src/components/DeepLinkRegistrar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import { RootStackNavigatorProp } from '~/navigation/types';
import { useTrack } from '~/shared/contexts/AnalyticsContext';
import { useReportError } from '~/shared/contexts/ErrorReportingContext';

const MARFA_EVENT_HASH = -1082633448;

const KNOWN_NON_DEEPLINK_ROUTES = ['community', '~'];

export const isInternalLink = (url: string) => url.startsWith('https://gallery.so/');
Expand Down Expand Up @@ -150,31 +148,6 @@ export function DeepLinkRegistrar() {
return;
}

const parsedUrl = new URL(url);

// if the url is for a route we don't support deeplinking to, return early so we don't treat it as a username, collectionId, etc.
if (!isInternalLinkWithDeepLink(url)) {
return;
}

/**
* Marfa Event Check In
*/
if (parsedUrl.pathname === '/mobile' && parsedUrl.searchParams.get('event')) {
const hashedEventParam = await simpleHash(parsedUrl.searchParams.get('event') ?? '');
if (hashedEventParam === MARFA_EVENT_HASH) {
navigation.navigate('MainTabs', {
screen: 'HomeTab',
params: {
screen: 'Home',
params: { screen: 'Curated', params: { showMarfaCheckIn: true } },
},
});
return;
}
return;
}

handleDeepLinkNavigation(url, navigation);
} catch (e: unknown) {
if (e instanceof Error) {
Expand Down

0 comments on commit 61a09d9

Please sign in to comment.