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:
8
lib/utils/favicon.ts
Normal file
8
lib/utils/favicon.ts
Normal 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'
|
||||
Reference in New Issue
Block a user