diff --git a/packages/protocol-dashboard/package.json b/packages/protocol-dashboard/package.json index 907aeb122fc..e92d58f2289 100644 --- a/packages/protocol-dashboard/package.json +++ b/packages/protocol-dashboard/package.json @@ -2,6 +2,7 @@ "name": "audius-protocol-dashboard", "version": "0.1.0", "private": true, + "homepage": "./", "dependencies": { "3box": "^1.22.2", "@apollo/client": "^3.3.7", diff --git a/packages/protocol-dashboard/src/hooks/useRerouteLegacy.ts b/packages/protocol-dashboard/src/hooks/useRerouteLegacy.ts index 68cad3563f2..c4f41926cff 100644 --- a/packages/protocol-dashboard/src/hooks/useRerouteLegacy.ts +++ b/packages/protocol-dashboard/src/hooks/useRerouteLegacy.ts @@ -5,15 +5,17 @@ import { useLocation } from 'react-router-dom' * NOTE: updated the route from the legacy url structure to hash routing. * ie. /services/service-providers => /#/services/service-providers * - * NOTE: When switching to being served from ipfs, this needs to be updated for the - * client to be loaded via ipns + * NOTE: After switching to ipfs hosted, we can remove entirely */ // -------------------------------- Hooks -------------------------------- export const useRerouteLegacy = () => { const location = useLocation() useEffect(() => { - if (window.location.pathname !== '/') { + if ( + window.location.pathname !== '/' && + !window.location.pathname.includes('/ipns') + ) { window.history.replaceState({}, '', `/#${window.location.pathname}`) } }, [location])