diff --git a/app/auth/actions.ts b/app/auth/actions.ts index cd8f221..4840892 100644 --- a/app/auth/actions.ts +++ b/app/auth/actions.ts @@ -37,7 +37,10 @@ function mapAuthError(message: string, t: AuthTranslations): string { async function getOrigin(): Promise { const h = await headers(); const proto = h.get('x-forwarded-proto') ?? 'https'; - const host = h.get('x-forwarded-host') ?? h.get('host') ?? 'reelmark.app'; + const host = + h.get('x-forwarded-host') ?? + h.get('host') ?? + 'reelmark-silexio.vercel.app'; return `${proto}://${host}`; } diff --git a/components/shared/PWAInstallPrompt.tsx b/components/shared/PWAInstallPrompt.tsx index bd3ba82..253f797 100644 --- a/components/shared/PWAInstallPrompt.tsx +++ b/components/shared/PWAInstallPrompt.tsx @@ -30,7 +30,7 @@ export function PWAInstallPrompt() { 'transition-transform duration-(--duration-slow) ease-apple', visible ? 'translate-y-0' - : '-translate-y-[200%] pointer-events-none' + : 'translate-y-[-200%] pointer-events-none' )} >
diff --git a/lib/metadata.ts b/lib/metadata.ts index 2f9b438..d97e346 100644 --- a/lib/metadata.ts +++ b/lib/metadata.ts @@ -4,7 +4,7 @@ import { SUPPORTED_LANGUAGES } from '@/lib/i18n/config'; import type { Language } from '@/lib/i18n/translations'; export const BASE_URL = - process.env.NEXT_PUBLIC_BASE_URL || 'https://reelmark.app'; + process.env.NEXT_PUBLIC_BASE_URL || 'https://localhost:3000'; interface MediaMetadataOptions { title: string; diff --git a/tests/unit/metadata.test.ts b/tests/unit/metadata.test.ts index 1875361..c9c6ef4 100644 --- a/tests/unit/metadata.test.ts +++ b/tests/unit/metadata.test.ts @@ -53,9 +53,9 @@ describe('buildPageMetadata', () => { it('sets alternates.canonical when provided', () => { const meta = buildPageMetadata('Page', 'Desc', { - canonical: 'https://reelmark.app/page', + canonical: `${BASE_URL}/page`, }); - expect(meta.alternates?.canonical).toBe('https://reelmark.app/page'); + expect(meta.alternates?.canonical).toBe(`${BASE_URL}/page`); }); it('omits alternates when canonical is absent', () => { @@ -80,12 +80,10 @@ describe('buildMediaMetadata', () => { expect(meta.description).toBe( 'A team of explorers travel through a wormhole.' ); - expect(meta.alternates?.canonical).toBe( - 'https://reelmark.app/en/movie/157336' - ); + expect(meta.alternates?.canonical).toBe(`${BASE_URL}/en/movie/157336`); expect(meta.alternates?.languages).toMatchObject({ - en: 'https://reelmark.app/en/movie/157336', - fr: 'https://reelmark.app/fr/movie/157336', + en: `${BASE_URL}/en/movie/157336`, + fr: `${BASE_URL}/fr/movie/157336`, }); }); @@ -134,16 +132,14 @@ describe('buildMediaMetadata', () => { describe('localizedAlternates', () => { it('builds canonical on the given language with hreflang alternates', () => { const alt = localizedAlternates('fr', '/movie/157336'); - expect(alt.canonical).toBe('https://reelmark.app/fr/movie/157336'); + expect(alt.canonical).toBe(`${BASE_URL}/fr/movie/157336`); expect(alt.languages).toMatchObject({ - en: 'https://reelmark.app/en/movie/157336', - fr: 'https://reelmark.app/fr/movie/157336', + en: `${BASE_URL}/en/movie/157336`, + fr: `${BASE_URL}/fr/movie/157336`, }); }); it('maps the root path to the bare locale prefix', () => { - expect(localizedAlternates('en', '/').canonical).toBe( - 'https://reelmark.app/en' - ); + expect(localizedAlternates('en', '/').canonical).toBe(`${BASE_URL}/en`); }); });