Skip to content

Commit

Permalink
fix: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
reneaaron committed Sep 25, 2024
1 parent 8804e58 commit 348d451
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions hooks/useHandleLinking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import * as Linking from "expo-linking";
import { router, useRootNavigationState } from "expo-router";
import React from "react";

// TODO: Remove exp://
const SUPPORTED_SCHEMES = ["lightning:", "bitcoin:", "alby:", "exp:"];
// TESTING: ["lightning:", "bitcoin:", "alby:", "exp:"]
const SUPPORTED_SCHEMES = ["lightning:", "bitcoin:", "alby:"];

export function useHandleLinking() {
const rootNavigationState = useRootNavigationState();
Expand All @@ -21,8 +21,8 @@ export function useHandleLinking() {
? url.replace(scheme + "//", scheme)
: url;

// TODO: Remove, only for debugging purposes
currentUrl = currentUrl.replace("exp:127.0.0.1:8081/--/", "lightning:");
// TESTING:
// currentUrl = currentUrl.replace("exp:127.0.0.1:8081/--/", "lightning:");

// Instead of dismissing all screens, we'll use replace to avoid navigation stack issues
router.replace({
Expand All @@ -35,7 +35,8 @@ export function useHandleLinking() {
}
}

// Code below here is only executed if the link could not be handled
// Redirect the user to the home screen
// if no match was found
router.replace({
pathname: "/",
});
Expand Down

0 comments on commit 348d451

Please sign in to comment.