Skip to content

Commit

Permalink
bug fix gh pages path parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
ryley-o committed Oct 31, 2024
1 parent 9aea284 commit 941c8b8
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,10 @@ function App() {
// case when running a server
let [contractAddress, tokenId] = window.location.pathname.split("/").slice(2);
// case when running on github pages w/404.html re-routing
const path_debug = getRedirectPathParam();
console.log("split debugging", path_debug?.split("/"));
if (!contractAddress || !tokenId) {
if (!contractAddress && !tokenId) {
const path_ = getRedirectPathParam();
console.log("parsing github pages re-route", path_?.split("/"));
if (path_) {
[contractAddress, tokenId] = path_.split("/");
[, contractAddress, tokenId] = path_.split("/");
}
}
const [error, setError] = useState<string | null>(null);
Expand Down

0 comments on commit 941c8b8

Please sign in to comment.