Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Commit

Permalink
fix(router): root to /pay-as-we-go
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricpoon committed Oct 23, 2024
1 parent 1ffe3a1 commit 1c7897b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions public/service-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ precacheAndRoute(self.__WB_MANIFEST || []);

// Cache API requests
registerRoute(
({ url }) => url.origin === 'http://localhost:3000', // Update with your API domain
({ url }) => url.origin === 'https://cedio.github.io', // Update with your API domain if different
new StaleWhileRevalidate({
cacheName: 'api-cache',
})
Expand All @@ -29,6 +29,6 @@ registerRoute(
registerRoute(
({ request }) => request.mode === 'navigate',
async () => {
return caches.match('/index.html', { ignoreSearch: true });
return caches.match('/pay-as-we-go/index.html', { ignoreSearch: true });
}
);
4 changes: 2 additions & 2 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Navbar from './components/Navbar';

function App() {
return (
<Router>
<Router basename="/pay-as-we-go">
<Navbar />
<Routes>
<Route path="/" element={<Home />} />
Expand All @@ -20,4 +20,4 @@ function App() {
);
}

export default App;
export default App;

0 comments on commit 1c7897b

Please sign in to comment.