diff --git a/apps/frontend/public/favicon.ico b/apps/frontend/public/favicon.ico new file mode 100644 index 0000000..3cd694c Binary files /dev/null and b/apps/frontend/public/favicon.ico differ diff --git a/apps/frontend/src/routes/__root.tsx b/apps/frontend/src/routes/__root.tsx index c12db02..a52d6da 100644 --- a/apps/frontend/src/routes/__root.tsx +++ b/apps/frontend/src/routes/__root.tsx @@ -20,6 +20,12 @@ interface MyRouterContext { const THEME_INIT_SCRIPT = `(function(){try{var stored=window.localStorage.getItem('theme');var mode=(stored==='light'||stored==='dark')?stored:'dark';var root=document.documentElement;root.classList.remove('light','dark');root.classList.add(mode);root.setAttribute('data-theme',mode);root.style.colorScheme=mode;}catch(e){}})();` +// Vite hands us `/project2` (no trailing slash) here, so normalize before +// appending asset names. +const BASE_URL = import.meta.env.BASE_URL.endsWith('/') + ? import.meta.env.BASE_URL + : `${import.meta.env.BASE_URL}/` + export const Route = createRootRouteWithContext()({ head: () => ({ meta: [ @@ -31,7 +37,7 @@ export const Route = createRootRouteWithContext()({ content: 'width=device-width, initial-scale=1', }, { - title: 'TanStack Start Starter', + title: 'G-Spotter', }, ], links: [ @@ -39,6 +45,11 @@ export const Route = createRootRouteWithContext()({ rel: 'stylesheet', href: appCss, }, + { + rel: 'icon', + type: 'image/x-icon', + href: `${BASE_URL}favicon.ico`, + }, ], }), shellComponent: RootDocument,