Skip to content

Commit

Permalink
chore: accept suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
Couto committed Nov 28, 2024
1 parent a5ce814 commit 4be3942
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export function LiveApp({ match, appId: propsAppId, location }: Props) {
};
};
const appId = propsAppId || match.params?.appId;
const returnTo = useMemo(() => {
const returnTo = useMemo<string | undefined>(() => {
const params = new URLSearchParams(search);
return urlParams?.returnTo || params.get("returnTo") || internalParams?.returnTo;
}, [search, urlParams?.returnTo, internalParams?.returnTo]);
Expand All @@ -60,7 +60,7 @@ export function LiveApp({ match, appId: propsAppId, location }: Props) {
}, [search, customDappUrl, urlParams?.customDappUrl, internalParams?.customDappUrl]);

const handleClose = useCallback(() => {
if (typeof returnTo === "string" && returnTo.startsWith("/swap")) {
if (returnTo?.startsWith("/swap")) {
track("button_click", {
...swapTrackingProperties,
button: "close X",
Expand Down

0 comments on commit 4be3942

Please sign in to comment.