fix: pwa issues

This commit is contained in:
Akuoko Daniel Jnr 2021-04-22 15:00:25 +00:00
parent fe907d2abb
commit 194ed28075
No known key found for this signature in database
GPG Key ID: 1C95803CACD3E9DC
14 changed files with 6273 additions and 511 deletions

View File

@ -33,6 +33,9 @@ export default class WebsitePrototypeWrapper extends React.Component {
<link rel="icon" type="image/png" sizes="16x16" href="/static/favicon-16x16.png" /> <link rel="icon" type="image/png" sizes="16x16" href="/static/favicon-16x16.png" />
<link rel="shortcut icon" href="/static/favicon.ico" /> <link rel="shortcut icon" href="/static/favicon.ico" />
<link rel="manifest" href="/manifest.json" />
<link rel="apple-touch-icon" href="/static/icon-96x96.png" />
</Head> </Head>
{this.props.children} {this.props.children}
</React.Fragment> </React.Fragment>

5
next.config.js Normal file
View File

@ -0,0 +1,5 @@
const withOffline = require("next-offline");
const nextConfig = {};
module.exports = withOffline(nextConfig);

6722
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -58,6 +58,7 @@
"moment": "^2.29.1", "moment": "^2.29.1",
"morgan": "^1.10.0", "morgan": "^1.10.0",
"next": "^10.0.7", "next": "^10.0.7",
"next-offline": "^5.0.5",
"pg": "^8.5.1", "pg": "^8.5.1",
"prism-react-renderer": "^1.2.0", "prism-react-renderer": "^1.2.0",
"prismjs": "^1.23.0", "prismjs": "^1.23.0",

51
public/manifest.json Normal file
View File

@ -0,0 +1,51 @@
{ "name": "Slate",
"short_name": "Slate",
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone",
"orientation": "portrait",
"scope": "/_",
"start_url": "/_",
"icons": [
{
"src": "/static/icon-72x72.png",
"type": "image/png",
"sizes": "72x72"
},
{
"src": "/static/icon-96x96.png",
"type": "image/png",
"sizes": "96x96"
},
{
"src": "/static/icon-128x128.png",
"type": "image/png",
"sizes": "128x128"
},
{
"src": "/static/icon-144x144.png",
"type": "image/png",
"sizes": "144x144"
},
{
"src": "/static/icon-152x152.png",
"type": "image/png",
"sizes": "152x152"
},
{
"src": "/static/icon-192x192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "/static/icon-384x384.png",
"type": "image/png",
"sizes": "384x384"
},
{
"src": "/static/icon-512x512.png",
"type": "image/png",
"sizes": "512x512"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@ -15,6 +15,7 @@ import next from "next";
import compression from "compression"; import compression from "compression";
import cors from "cors"; import cors from "cors";
import morgan from "morgan"; import morgan from "morgan";
import path from "path";
import { FilecoinNumber, Converter } from "@glif/filecoin-number"; import { FilecoinNumber, Converter } from "@glif/filecoin-number";
@ -124,6 +125,7 @@ app.prepare().then(async () => {
} }
server.use("/public", express.static("public")); server.use("/public", express.static("public"));
server.get("/service-worker.js", express.static(path.join(__dirname, ".next")));
server.get("/system", async (r, s) => s.redirect("/_/system")); server.get("/system", async (r, s) => s.redirect("/_/system"));
server.get("/experiences", async (r, s) => s.redirect("/_/system")); server.get("/experiences", async (r, s) => s.redirect("/_/system"));
server.get("/_/experiences", async (r, s) => s.redirect("/_/system")); server.get("/_/experiences", async (r, s) => s.redirect("/_/system"));