From 3739e1101664452eb89a50b6142189129bcd8791 Mon Sep 17 00:00:00 2001 From: Rephl3x Date: Fri, 23 Jan 2026 20:07:17 +1300 Subject: [PATCH] Use bundled branding assets --- frontend/app/ui/BrandingFavicon.tsx | 10 ++-------- frontend/app/ui/BrandingLogo.tsx | 24 +----------------------- frontend/public/branding-icon.svg | 13 +++++++++++++ frontend/public/branding-logo.svg | 14 ++++++++++++++ 4 files changed, 30 insertions(+), 31 deletions(-) create mode 100644 frontend/public/branding-icon.svg create mode 100644 frontend/public/branding-logo.svg diff --git a/frontend/app/ui/BrandingFavicon.tsx b/frontend/app/ui/BrandingFavicon.tsx index adf9e28..0a334d8 100644 --- a/frontend/app/ui/BrandingFavicon.tsx +++ b/frontend/app/ui/BrandingFavicon.tsx @@ -1,21 +1,15 @@ 'use client' import { useEffect } from 'react' -import { getApiBase } from '../lib/auth' - -const STORAGE_KEY = 'branding_version' export default function BrandingFavicon() { useEffect(() => { - const baseUrl = getApiBase() - const version = - (typeof window !== 'undefined' && window.localStorage.getItem(STORAGE_KEY)) || '' - const versionSuffix = version ? `?v=${encodeURIComponent(version)}` : '' - const href = `${baseUrl}/branding/favicon.ico${versionSuffix}` + const href = '/branding-icon.svg' let link = document.querySelector("link[rel='icon']") as HTMLLinkElement | null if (!link) { link = document.createElement('link') link.rel = 'icon' + link.type = 'image/svg+xml' document.head.appendChild(link) } link.href = href diff --git a/frontend/app/ui/BrandingLogo.tsx b/frontend/app/ui/BrandingLogo.tsx index afc3148..5f0092e 100644 --- a/frontend/app/ui/BrandingLogo.tsx +++ b/frontend/app/ui/BrandingLogo.tsx @@ -1,36 +1,14 @@ -'use client' - -import { useEffect, useState } from 'react' -import { getApiBase } from '../lib/auth' - -const STORAGE_KEY = 'branding_version' - type BrandingLogoProps = { className?: string alt?: string } export default function BrandingLogo({ className, alt = 'Magent logo' }: BrandingLogoProps) { - const [src, setSrc] = useState(null) - - useEffect(() => { - const baseUrl = getApiBase() - const version = - (typeof window !== 'undefined' && window.localStorage.getItem(STORAGE_KEY)) || '' - const versionSuffix = version ? `?v=${encodeURIComponent(version)}` : '' - setSrc(`${baseUrl}/branding/logo.png${versionSuffix}`) - }, []) - - if (!src) { - return null - } - return ( {alt} setSrc(null)} /> ) } diff --git a/frontend/public/branding-icon.svg b/frontend/public/branding-icon.svg new file mode 100644 index 0000000..a21a07f --- /dev/null +++ b/frontend/public/branding-icon.svg @@ -0,0 +1,13 @@ + + + + + + + + + + diff --git a/frontend/public/branding-logo.svg b/frontend/public/branding-logo.svg new file mode 100644 index 0000000..802dca7 --- /dev/null +++ b/frontend/public/branding-logo.svg @@ -0,0 +1,14 @@ + + + + + + + + + + +