diff --git a/e2e/pwa.spec.js b/e2e/pwa.spec.js index 5f401f3b..ce277496 100644 --- a/e2e/pwa.spec.js +++ b/e2e/pwa.spec.js @@ -24,9 +24,9 @@ test.describe('PWA', () => { expect(scope).toBe('http://localhost:3000/') }) - test('serve o ícone svg da aba', async ({ page }) => { - const response = await page.goto('/icon.svg') + test('serve o ícone da aba', async ({ page }) => { + const response = await page.goto('/logo.ico') expect(response.status()).toBe(200) - expect(response.headers()['content-type']).toContain('svg') + expect(response.headers()['content-type']).toMatch(/image\/(x-icon|vnd\.microsoft\.icon)/) }) }) diff --git a/public/logo.ico b/public/logo.ico new file mode 100644 index 00000000..dcf05112 Binary files /dev/null and b/public/logo.ico differ diff --git a/public/logo.png b/public/logo.png index 497ef344..18e03dc1 100644 Binary files a/public/logo.png and b/public/logo.png differ diff --git a/public/sw.js b/public/sw.js index 6771a5e1..900c394b 100644 --- a/public/sw.js +++ b/public/sw.js @@ -1,7 +1,7 @@ -const CACHE_VERSION = 'v3' +const CACHE_VERSION = 'v4' const STATIC_CACHE = `cb-static-${CACHE_VERSION}` -const STATIC_ASSETS = ['/', '/eventos', '/sobre', '/manifest.webmanifest', '/icon.svg'] +const STATIC_ASSETS = ['/', '/eventos', '/sobre', '/manifest.webmanifest', '/logo.ico'] self.addEventListener('install', (event) => { event.waitUntil(caches.open(STATIC_CACHE).then((cache) => cache.addAll(STATIC_ASSETS))) diff --git a/src/app/icon.svg b/src/app/icon.svg deleted file mode 100644 index 09ae28a9..00000000 --- a/src/app/icon.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/src/app/layout.jsx b/src/app/layout.jsx index 3e0a3382..8e1e2f55 100644 --- a/src/app/layout.jsx +++ b/src/app/layout.jsx @@ -29,6 +29,9 @@ export const metadata = { metadataBase: new URL(SITE_URL), title: 'Eventos Café Bugado', description: 'Agenda de eventos da comunidade Café Bugado', + icons: { + icon: '/logo.ico', + }, openGraph: { siteName: 'Eventos - Comunidade Café Bugado', locale: 'pt_BR', diff --git a/src/components/Header.jsx b/src/components/Header.jsx index e07ddf41..6ab19baf 100644 --- a/src/components/Header.jsx +++ b/src/components/Header.jsx @@ -62,7 +62,12 @@ export default function Header() { rel="noopener noreferrer" sx={{ display: 'flex', alignItems: 'center', flex: 1 }} > - +