|
7 | 7 | } from "@t3tools/shared/promptLinks"; |
8 | 8 | import { useLocation } from "@tanstack/react-router"; |
9 | 9 | import * as Schema from "effect/Schema"; |
10 | | -import { type ReactNode, useEffect, useMemo, useRef, useState } from "react"; |
| 10 | +import { type ReactNode, useEffect, useRef, useState } from "react"; |
11 | 11 |
|
12 | 12 | import { APP_DISPLAY_NAME } from "~/branding"; |
13 | 13 | import { useLocalStorage } from "~/hooks/useLocalStorage"; |
@@ -65,13 +65,10 @@ export function useHostedPromptLinkLanding(enabled: boolean): ReactNode | null { |
65 | 65 | const { environments, isReady } = useEnvironments(); |
66 | 66 | const [opener, setOpener] = useLocalStorage(OPENER_STORAGE_KEY, null, Opener); |
67 | 67 | const [continuedHref, setContinuedHref] = useState<string | null>(null); |
68 | | - const appPath = useMemo( |
69 | | - () => |
70 | | - enabled && isHostedStaticApp() |
71 | | - ? promptLinkAppPath(new URL(href, window.location.origin).href, window.location.origin) |
72 | | - : null, |
73 | | - [enabled, href], |
74 | | - ); |
| 68 | + const appPath = |
| 69 | + enabled && isHostedStaticApp() |
| 70 | + ? promptLinkAppPath(new URL(href, window.location.origin).href, window.location.origin) |
| 71 | + : null; |
75 | 72 | if (appPath === null || continuedHref === href) return null; |
76 | 73 | const canContinue = isReady && environments.length > 0; |
77 | 74 | if (opener === "browser") { |
@@ -102,7 +99,7 @@ function HostedPromptLinkLanding({ |
102 | 99 | readonly openInAppRemembered: boolean; |
103 | 100 | readonly onChoose: (choice: "app" | "browser", remember: boolean) => void; |
104 | 101 | }) { |
105 | | - const summary = useMemo(() => summarize(appPath), [appPath]); |
| 102 | + const summary = summarize(appPath); |
106 | 103 | const [remember, setRemember] = useState(false); |
107 | 104 | const deepLink = promptLinkDeepLink(appPath); |
108 | 105 | const onPhone = /android|iphone|ipad/i.test(navigator.userAgent); |
|
0 commit comments