mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-29 18:13:47 +00:00
Merge pull request #92 from evansvl/main
feat: Add new Layout component with navigation, branding, theme switc…
This commit is contained in:
@@ -270,6 +270,17 @@ export default function Layout({ children }: LayoutProps) {
|
|||||||
document.title = appName || 'VPN' // Fallback title if name is empty
|
document.title = appName || 'VPN' // Fallback title if name is empty
|
||||||
}, [appName])
|
}, [appName])
|
||||||
|
|
||||||
|
// Update favicon
|
||||||
|
useEffect(() => {
|
||||||
|
if (!logoUrl) return
|
||||||
|
|
||||||
|
const link = document.querySelector<HTMLLinkElement>("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
|
// Fetch contests and polls counts to determine if they should be shown
|
||||||
const { data: contestsCount } = useQuery({
|
const { data: contestsCount } = useQuery({
|
||||||
queryKey: ['contests-count'],
|
queryKey: ['contests-count'],
|
||||||
|
|||||||
Reference in New Issue
Block a user