Spaces:
Sleeping
Sleeping
Update pages/_app.tsx
Browse files- pages/_app.tsx +6 -12
pages/_app.tsx
CHANGED
|
@@ -7,12 +7,10 @@ import "react-tooltip/dist/react-tooltip.css"
|
|
| 7 |
import { getSiteName } from "../lib/env"
|
| 8 |
|
| 9 |
const App = ({ Component, pageProps }: AppProps) => {
|
| 10 |
-
// ✅ Register
|
| 11 |
useEffect(() => {
|
| 12 |
if (typeof window !== "undefined" && "serviceWorker" in navigator) {
|
| 13 |
-
navigator.serviceWorker.register("/sw.js").catch(() => {
|
| 14 |
-
// silent fail (HF / first load)
|
| 15 |
-
})
|
| 16 |
}
|
| 17 |
}, [])
|
| 18 |
|
|
@@ -33,17 +31,14 @@ const App = ({ Component, pageProps }: AppProps) => {
|
|
| 33 |
name="description"
|
| 34 |
content="Watch videos or play music in sync with your friends"
|
| 35 |
/>
|
| 36 |
-
<meta name="author"
|
| 37 |
-
<meta name="copyright" content="
|
| 38 |
|
| 39 |
-
{/* ✅ PWA
|
| 40 |
<link rel="manifest" href="/site.webmanifest" />
|
| 41 |
<meta name="theme-color" content="#28a745" />
|
| 42 |
-
|
| 43 |
-
{/* ✅ Required for Android fullscreen */}
|
| 44 |
<meta name="mobile-web-app-capable" content="yes" />
|
| 45 |
<meta name="apple-mobile-web-app-capable" content="yes" />
|
| 46 |
-
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
| 47 |
|
| 48 |
{/* App name */}
|
| 49 |
<meta name="application-name" content={getSiteName()} />
|
|
@@ -55,11 +50,10 @@ const App = ({ Component, pageProps }: AppProps) => {
|
|
| 55 |
<link rel="icon" href="/favicon.ico" />
|
| 56 |
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#28a745" />
|
| 57 |
|
| 58 |
-
{/* Windows
|
| 59 |
<meta name="msapplication-TileColor" content="#2b5797" />
|
| 60 |
<meta name="msapplication-TileImage" content="/mstile-144x144.png" />
|
| 61 |
|
| 62 |
-
{/* Canonical */}
|
| 63 |
<link rel="canonical" href="/" />
|
| 64 |
</Head>
|
| 65 |
|
|
|
|
| 7 |
import { getSiteName } from "../lib/env"
|
| 8 |
|
| 9 |
const App = ({ Component, pageProps }: AppProps) => {
|
| 10 |
+
// ✅ PWA: Register Service Worker
|
| 11 |
useEffect(() => {
|
| 12 |
if (typeof window !== "undefined" && "serviceWorker" in navigator) {
|
| 13 |
+
navigator.serviceWorker.register("/sw.js").catch(() => {})
|
|
|
|
|
|
|
| 14 |
}
|
| 15 |
}, [])
|
| 16 |
|
|
|
|
| 31 |
name="description"
|
| 32 |
content="Watch videos or play music in sync with your friends"
|
| 33 |
/>
|
| 34 |
+
<meta name="author" content="Yasamato <https://github.com/Yasamato>" />
|
| 35 |
+
<meta name="copyright" content="Yasamato, 2022" />
|
| 36 |
|
| 37 |
+
{/* ✅ PWA */}
|
| 38 |
<link rel="manifest" href="/site.webmanifest" />
|
| 39 |
<meta name="theme-color" content="#28a745" />
|
|
|
|
|
|
|
| 40 |
<meta name="mobile-web-app-capable" content="yes" />
|
| 41 |
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
|
|
| 42 |
|
| 43 |
{/* App name */}
|
| 44 |
<meta name="application-name" content={getSiteName()} />
|
|
|
|
| 50 |
<link rel="icon" href="/favicon.ico" />
|
| 51 |
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#28a745" />
|
| 52 |
|
| 53 |
+
{/* Windows */}
|
| 54 |
<meta name="msapplication-TileColor" content="#2b5797" />
|
| 55 |
<meta name="msapplication-TileImage" content="/mstile-144x144.png" />
|
| 56 |
|
|
|
|
| 57 |
<link rel="canonical" href="/" />
|
| 58 |
</Head>
|
| 59 |
|