From ba930fd4e7fbb69b76c235eaffdaefd0f3512b50 Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Sat, 24 Jun 2023 00:29:20 -0230 Subject: [PATCH] Fix back button (#180) The back button was broken because the `homepage="."` configuration was incompatibile with how we were using the history API. This means the page will now only work when hosted from the `/dapps/` path. --- package.json | 2 +- src/App.js | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 82a6b47..25cee2d 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "eject": "react-scripts eject", "update-changelog": "./scripts/auto-changelog.sh" }, - "homepage": ".", + "homepage": "https://metamask.github.io/dapps/", "eslintConfig": { "extends": "react-app" }, diff --git a/src/App.js b/src/App.js index 0b4298a..3557bb8 100644 --- a/src/App.js +++ b/src/App.js @@ -34,11 +34,8 @@ function App() { if (isLoading) return null - const currentPath = window.location.pathname; - const basename = currentPath.startsWith('/dapps') ? '/dapps' : undefined; - return ( - +