From 0461f2e5c37d854a1a4243ad9bd98bccc0b0d38b Mon Sep 17 00:00:00 2001 From: evansvl Date: Sun, 25 Jan 2026 23:03:32 +0300 Subject: [PATCH] feat: Add new Layout component with navigation, branding, theme switching, and Telegram Web App integration. --- src/components/layout/Layout.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/components/layout/Layout.tsx b/src/components/layout/Layout.tsx index 813cecb..49f231d 100644 --- a/src/components/layout/Layout.tsx +++ b/src/components/layout/Layout.tsx @@ -270,6 +270,17 @@ export default function Layout({ children }: LayoutProps) { document.title = appName || 'VPN' // Fallback title if name is empty }, [appName]) + // Update favicon + useEffect(() => { + if (!logoUrl) return + + const link = document.querySelector("link[rel*='icon']") || document.createElement('link') + link.type = 'image/x-icon' + link.rel = 'shortcut icon' + link.href = logoUrl + document.getElementsByTagName('head')[0].appendChild(link) + }, [logoUrl]) + // Fetch contests and polls counts to determine if they should be shown const { data: contestsCount } = useQuery({ queryKey: ['contests-count'],