@@ -13,6 +13,7 @@ import { Header } from "@/features/layout/Header";
1313import { Footer } from "@/features/layout/Footer" ;
1414import { TailwindIndicator } from "@/components/utils/TailwindIndicator" ;
1515import { NextTopLoader } from "@/components/ui/next-top-loader" ;
16+ import { ServiceWorkerRegistration } from "@/components/pwa/ServiceWorkerRegistration" ;
1617
1718import { Providers } from "./providers" ;
1819
@@ -116,15 +117,26 @@ export default async function RootLayout({ params, children }: RootLayoutProps)
116117 < meta charSet = "UTF-8" />
117118 < meta content = "width=device-width, initial-scale=1, maximum-scale=1 viewport-fit=cover" name = "viewport" />
118119
120+ { /* PWA Meta Tags */ }
121+ < meta content = "yes" name = "apple-mobile-web-app-capable" />
122+ < meta content = "default" name = "apple-mobile-web-app-status-bar-style" />
123+ < meta content = "Workout Cool" name = "apple-mobile-web-app-title" />
124+ < meta content = "yes" name = "mobile-web-app-capable" />
125+ < meta content = "#FF5722" name = "msapplication-TileColor" />
126+ < meta content = "/android-chrome-192x192.png" name = "msapplication-TileImage" />
127+
128+ { /* PWA Manifest */ }
129+ < link href = "/manifest.json" rel = "manifest" />
130+
119131 { /* eslint-disable-next-line @next/next/no-page-custom-font */ }
120132 < link as = "style" href = "https://fonts.googleapis.com/css2?family=Inter:wght@400;700& display = swap " rel = "preload" />
121133
122134 { /* Alternate hreflang for i18n */ }
123135 < link href = "https://www.workout.cool/fr" hrefLang = "fr" rel = "alternate" />
124136 < link href = "https://www.workout.cool/en" hrefLang = "en" rel = "alternate" />
125137
126- { /* Balise theme- color unique, synchronisée dynamiquement */ }
127- < meta content = "#f3f4f6 " name = "theme-color" />
138+ { /* Theme color for PWA */ }
139+ < meta content = "#FF5722 " name = "theme-color" />
128140
129141 { /* TODO: maybe add some ads ? */ }
130142 < noscript >
@@ -150,6 +162,7 @@ export default async function RootLayout({ params, children }: RootLayoutProps)
150162 suppressHydrationWarning
151163 >
152164 < Providers locale = { locale } >
165+ < ServiceWorkerRegistration />
153166 < WorkoutSessionsSynchronizer />
154167 < ThemeSynchronizer />
155168 < NextTopLoader color = "#FF5722" delay = { 100 } showSpinner = { false } />
0 commit comments