mirror of
https://github.com/supabase/supabase.git
synced 2026-12-03 23:18:57 +00:00
## Problem - Local apps are hard to distinguish from hosted apps in browser tabs. ## Solution - Add blue blueprint icons to local development in all 8 apps and Studio CLI. - Keep normal branding for production, hosted staging and self-hosted Studio. - Builds on #51419. | Before | After | | --- | --- | | <img width="1290" height="76" alt="CleanShot 2026-10-08 at 13 29 14@2x" src="https://github.com/user-attachments/assets/72bc50d7-37e0-47d0-8dfd-50e233a443bd" /> | <img width="1282" height="72" alt="CleanShot 2026-10-08 at 13 30 03@2x" src="https://github.com/user-attachments/assets/afb15a70-3938-4cff-9b41-dc6c25460b7c" /> | ## Review instructions - Start an app locally. Its browser tab should show the blue icon. - Check Studio CLI uses blue and hosted staging uses white. - Check production icons are unchanged, including Learn's black and white icon. - Run `node scripts/validate-favicons.mjs`. All 16 sets should pass. Asset and routing checks, formatting and Common/Studio type checks passed. Full builds have not been run. ## Checklist - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
62 lines
1.7 KiB
TypeScript
62 lines
1.7 KiB
TypeScript
import type { Metadata } from 'next'
|
|
|
|
import '@/styles/globals.css'
|
|
|
|
import { FeatureFlagProvider, TelemetryTagManager } from 'common'
|
|
import { genFaviconData } from 'common/MetaFavicons/app-router'
|
|
import { Inter } from 'next/font/google'
|
|
|
|
import { Providers } from './Providers'
|
|
import { Toaster } from './toaster'
|
|
import { API_URL } from '@/lib/constants'
|
|
|
|
const inter = Inter({ subsets: ['latin'] })
|
|
|
|
const BASE_PATH = process.env.NEXT_PUBLIC_BASE_PATH ?? ''
|
|
|
|
const FAVICON_ROUTE = process.env.NODE_ENV === 'development' ? '/favicon/local' : '/favicon'
|
|
|
|
export const metadata: Metadata = {
|
|
applicationName: 'Learn Supabase',
|
|
title: 'Learn Supabase',
|
|
description: 'Learn Supabase.',
|
|
metadataBase: new URL('https://supabase.com/learn'),
|
|
icons: genFaviconData(BASE_PATH, FAVICON_ROUTE),
|
|
manifest: `${BASE_PATH}${FAVICON_ROUTE}/manifest.json`,
|
|
openGraph: {
|
|
type: 'article',
|
|
authors: 'Supabase',
|
|
url: `${BASE_PATH}`,
|
|
images: `${BASE_PATH}/img/supabase-og-image.png`,
|
|
publishedTime: new Date().toISOString(),
|
|
modifiedTime: new Date().toISOString(),
|
|
},
|
|
twitter: {
|
|
card: 'summary_large_image',
|
|
site: '@supabase',
|
|
creator: '@supabase',
|
|
images: `${BASE_PATH}/img/supabase-og-image.png`,
|
|
},
|
|
}
|
|
|
|
interface RootLayoutProps {
|
|
children: React.ReactNode
|
|
}
|
|
|
|
export default async function Layout({ children }: RootLayoutProps) {
|
|
return (
|
|
<html lang="en" suppressHydrationWarning>
|
|
<head />
|
|
<body className={`${inter.className} antialiased`}>
|
|
<TelemetryTagManager />
|
|
<FeatureFlagProvider API_URL={API_URL}>
|
|
<Providers>
|
|
{children}
|
|
<Toaster />
|
|
</Providers>
|
|
</FeatureFlagProvider>
|
|
</body>
|
|
</html>
|
|
)
|
|
}
|