Skip to content

Commit

Permalink
chore: When the Explorer is deployed in production, remove the `HashR…
Browse files Browse the repository at this point in the history
…outer` (Consensys#502)
  • Loading branch information
alainncls authored Jan 5, 2024
1 parent 5c62029 commit 1490ade
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/explorer-deploy-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:

- name: Build
if: steps.check-changes.outputs.changed == 'true'
run: pnpm run build
run: pnpm run build:netlify
env:
VITE_WALLETCONNECT_PROJECT_ID: ${{ secrets.VITE_WALLETCONNECT_PROJECT_ID }}
VITE_INFURA_API_KEY: ${{ secrets.VITE_INFURA_API_KEY }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/explorer-deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
run: pnpm install --frozen-lockfile

- name: Build
run: pnpm run build
run: pnpm run build:netlify
env:
VITE_WALLETCONNECT_PROJECT_ID: ${{ secrets.VITE_WALLETCONNECT_PROJECT_ID }}
VITE_INFURA_API_KEY: ${{ secrets.VITE_INFURA_API_KEY }}
Expand Down
4 changes: 3 additions & 1 deletion explorer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@
"type": "module",
"scripts": {
"build": "tsc && vite build",
"build:netlify": "pnpm run build && pnpm run redirect",
"dev": "vite",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
"preview": "vite preview",
"redirect": "touch dist/_redirects && echo '/* /index.html 200' >> dist/_redirects"
},
"dependencies": {
"@radix-ui/react-dropdown-menu": "^2.0.6",
Expand Down
4 changes: 2 additions & 2 deletions explorer/src/routes/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Route, createHashRouter, createRoutesFromElements } from "react-router-dom";
import { Route, createBrowserRouter, createRoutesFromElements } from "react-router-dom";

import { Attestation } from "@/pages/Attestation";
import { Attestations } from "@/pages/Attestations";
Expand All @@ -17,7 +17,7 @@ import { loaderNetworkProvider } from "@/providers/network-provider/loader";
import { APP_ROUTES } from "./constants";
import { NotFoundPage } from "./NotFoundPage";

export const router = createHashRouter(
export const router = createBrowserRouter(
createRoutesFromElements(
<Route element={<Providers />} loader={loaderNetworkProvider}>
<Route path={APP_ROUTES.HOME} element={<Home />} />
Expand Down

0 comments on commit 1490ade

Please sign in to comment.