Skip to content

Commit

Permalink
fix: github pages paths
Browse files Browse the repository at this point in the history
  • Loading branch information
xtools-at committed Oct 20, 2023
1 parent bbd48fd commit 52a3169
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion next.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
reactStrictMode: true,
assetPrefix: process.env.ASSET_PREFIX || "",
assetPrefix: process.env.ASSET_PREFIX || "/smartcontract-ui",
basePath: "/smartcontract-ui",
};
10 changes: 3 additions & 7 deletions pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,8 @@ export default class MyDocument extends Document {
rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"
/>
<link
rel="icon"
href="/smartcontract-ui/icons/fav.png"
type="image/png"
/>
<link rel="manifest" href="/smartcontract-ui/manifest.json" />
<link rel="icon" href="/icons/fav.png" type="image/png" />
<link rel="manifest" href="/manifest.json" />
<script
dangerouslySetInnerHTML={{
__html: `
Expand Down Expand Up @@ -45,7 +41,7 @@ export default class MyDocument extends Document {

<script
dangerouslySetInnerHTML={{
__html: `if ('serviceWorker' in navigator) { navigator.serviceWorker.register('/sw.js') }`,
__html: `if ('serviceWorker' in navigator) { navigator.serviceWorker.register('/smartcontract-ui/sw.js') }`,
}}
></script>
</body>
Expand Down

0 comments on commit 52a3169

Please sign in to comment.