Skip to content

Commit b502239

Browse files
committed
Test
1 parent 6d991db commit b502239

File tree

3 files changed

+31
-32
lines changed

3 files changed

+31
-32
lines changed

apps/web/src/components/pwa-badge.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { useRegisterSW } from "virtual:pwa-register/react";
22
import Button from "../ui/button";
33

44
const isPWA = window.matchMedia("(display-mode: standalone)").matches;
5-
const enableReload = false;
5+
const enableReload = true;
66

77
export default function PWABadge() {
88
// Periodic sync is disabled, change the value to enable it, the period is in milliseconds

apps/web/src/main.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import ReactDOM from "react-dom/client";
33
import "./index.css";
44
import { RouterProvider } from "react-router-dom";
55
import { router } from "./router.tsx";
6-
// import PWABadge from "./components/pwa-badge.tsx";
6+
import PWABadge from "./components/pwa-badge.tsx";
77

88
import * as Sentry from "@sentry/react";
99

@@ -18,11 +18,10 @@ Sentry.init({
1818
replaysSessionSampleRate: 0.1, // This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production.
1919
replaysOnErrorSampleRate: 1.0, // If you're not already sampling the entire session, change the sample rate to 100% when sampling sessions where errors occur.
2020
});
21-
console.log("Hello World");
2221

2322
ReactDOM.createRoot(document.getElementById("root")!).render(
2423
<React.StrictMode>
2524
<RouterProvider router={router} />
26-
{/* <PWABadge /> */}
25+
<PWABadge />
2726
</React.StrictMode>,
2827
);

apps/web/vite.config.ts

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,41 +3,41 @@ import { sentryVitePlugin } from "@sentry/vite-plugin";
33

44
import { defineConfig } from "vite";
55
import react from "@vitejs/plugin-react-swc";
6-
// import { VitePWA } from "vite-plugin-pwa";
6+
import { VitePWA } from "vite-plugin-pwa";
77

88
// https://vitejs.dev/config/
99
export default defineConfig({
1010
base: "",
1111

1212
plugins: [
1313
react(),
14-
// VitePWA({
15-
// registerType: "prompt",
16-
// injectRegister: false,
17-
// manifestFilename: "manifest.json",
18-
// pwaAssets: {
19-
// disabled: false,
20-
// config: true,
21-
// },
22-
// manifest: {
23-
// name: "Helix Bridge",
24-
// short_name: "HelixBridge",
25-
// description: "Secure, fast, and low-cost cross-chain crypto transfers",
26-
// theme_color: "#00141D",
27-
// background_color: "#00141D",
28-
// },
29-
// workbox: {
30-
// globPatterns: ["**/*.{js,css,html,svg,png,ico}"],
31-
// cleanupOutdatedCaches: true,
32-
// clientsClaim: true,
33-
// },
34-
// devOptions: {
35-
// enabled: false,
36-
// navigateFallback: "index.html",
37-
// suppressWarnings: true,
38-
// type: "module",
39-
// },
40-
// }),
14+
VitePWA({
15+
registerType: "prompt",
16+
injectRegister: false,
17+
manifestFilename: "manifest.json",
18+
pwaAssets: {
19+
disabled: false,
20+
config: true,
21+
},
22+
manifest: {
23+
name: "Helix Bridge",
24+
short_name: "HelixBridge",
25+
description: "Secure, fast, and low-cost cross-chain crypto transfers",
26+
theme_color: "#00141D",
27+
background_color: "#00141D",
28+
},
29+
workbox: {
30+
globPatterns: ["**/*.{js,css,html,svg,png,ico}"],
31+
cleanupOutdatedCaches: true,
32+
clientsClaim: true,
33+
},
34+
devOptions: {
35+
enabled: false,
36+
navigateFallback: "index.html",
37+
suppressWarnings: true,
38+
type: "module",
39+
},
40+
}),
4141
sentryVitePlugin({
4242
org: "helix-ck",
4343
project: "javascript-react",

0 commit comments

Comments
 (0)