MCPcopy Create free account
hub / github.com/dailydotdev/apps / isPostUrl

Function isPostUrl

packages/shared/src/hooks/useAppStoreReviewPrompt.ts:17–21  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

15// A post page. A post opened over the feed pushes `/posts/:id` as its URL
16// too, so this covers the modal as well.
17export const isPostUrl = (url: string): boolean => {
18 const [path = ''] = url.split('#')[0].split('?');
19
20 return withoutLayoutVariantPrefix(path).startsWith('/posts/');
21};
22
23/**
24 * Opens the App Store review ask when Customer.io has scheduled one for this

Callers 3

useAppStoreReviewPromptFunction · 0.85
onRouteChangeFunction · 0.85

Calls 1

Tested by

no test coverage detected