fix(build): extract FAVICON_SERVICE_URL to prevent server-side createContext error

The share/[id] layout is a server component that imported FAVICON_SERVICE_URL
from icons.tsx, pulling in the entire React icon registry and triggering
createContext on the server. Moved the constant to its own favicon.ts module.
This commit is contained in:
Usman Baig
2026-03-23 13:29:53 +01:00
parent 75bf8acd1e
commit 55a08301f4
6 changed files with 14 additions and 9 deletions

8
lib/utils/favicon.ts Normal file
View File

@@ -0,0 +1,8 @@
/**
* Google's public favicon service base URL.
* Append `?domain=<host>&sz=<px>` to get a favicon.
*
* Kept in a separate module so server components can import it
* without pulling in the React-dependent icon registry.
*/
export const FAVICON_SERVICE_URL = 'https://www.google.com/s2/favicons'