From b8839fc1ffd58abbcf5176a8201760a60e5c403f Mon Sep 17 00:00:00 2001 From: Tomas Dvorak Date: Fri, 24 Oct 2025 19:41:55 +0200 Subject: [PATCH] hot fix #4 dev day #70 --- cache/prefetch/articles.json | 1 - cache/prefetch/articles.json.hdr | 1 - cache/prefetch/competition_aliases.json | 1 - cache/prefetch/competition_aliases.json.hdr | 1 - cache/prefetch/events_upcoming.json | 1 - cache/prefetch/events_upcoming.json.hdr | 1 - cache/prefetch/meta.json | 1 - cache/prefetch/prefetch_status.json | 37 ------------------- cache/prefetch/settings.json | 1 - cache/prefetch/settings.json.hdr | 1 - cache/prefetch/sponsors.json | 1 - cache/prefetch/sponsors.json.hdr | 1 - cache/prefetch/team_logo_overrides.json | 1 - cache/prefetch/team_logo_overrides.json.hdr | 1 - .../src/components/admin/AdminSidebar.tsx | 4 +- frontend/src/setupProxy.js | 12 ++++++ 16 files changed, 15 insertions(+), 51 deletions(-) delete mode 100644 cache/prefetch/articles.json delete mode 100644 cache/prefetch/articles.json.hdr delete mode 100644 cache/prefetch/competition_aliases.json delete mode 100644 cache/prefetch/competition_aliases.json.hdr delete mode 100644 cache/prefetch/events_upcoming.json delete mode 100644 cache/prefetch/events_upcoming.json.hdr delete mode 100644 cache/prefetch/meta.json delete mode 100644 cache/prefetch/prefetch_status.json delete mode 100644 cache/prefetch/settings.json delete mode 100644 cache/prefetch/settings.json.hdr delete mode 100644 cache/prefetch/sponsors.json delete mode 100644 cache/prefetch/sponsors.json.hdr delete mode 100644 cache/prefetch/team_logo_overrides.json delete mode 100644 cache/prefetch/team_logo_overrides.json.hdr diff --git a/cache/prefetch/articles.json b/cache/prefetch/articles.json deleted file mode 100644 index b668362..0000000 --- a/cache/prefetch/articles.json +++ /dev/null @@ -1 +0,0 @@ -{"items":[],"page":1,"page_size":10,"total":0} \ No newline at end of file diff --git a/cache/prefetch/articles.json.hdr b/cache/prefetch/articles.json.hdr deleted file mode 100644 index 80f2695..0000000 --- a/cache/prefetch/articles.json.hdr +++ /dev/null @@ -1 +0,0 @@ -{"etag":"","fetched_at":"2025-10-24T15:58:00Z","last_modified":""} \ No newline at end of file diff --git a/cache/prefetch/competition_aliases.json b/cache/prefetch/competition_aliases.json deleted file mode 100644 index 0637a08..0000000 --- a/cache/prefetch/competition_aliases.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/cache/prefetch/competition_aliases.json.hdr b/cache/prefetch/competition_aliases.json.hdr deleted file mode 100644 index 80f2695..0000000 --- a/cache/prefetch/competition_aliases.json.hdr +++ /dev/null @@ -1 +0,0 @@ -{"etag":"","fetched_at":"2025-10-24T15:58:00Z","last_modified":""} \ No newline at end of file diff --git a/cache/prefetch/events_upcoming.json b/cache/prefetch/events_upcoming.json deleted file mode 100644 index 0637a08..0000000 --- a/cache/prefetch/events_upcoming.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/cache/prefetch/events_upcoming.json.hdr b/cache/prefetch/events_upcoming.json.hdr deleted file mode 100644 index 80f2695..0000000 --- a/cache/prefetch/events_upcoming.json.hdr +++ /dev/null @@ -1 +0,0 @@ -{"etag":"","fetched_at":"2025-10-24T15:58:00Z","last_modified":""} \ No newline at end of file diff --git a/cache/prefetch/meta.json b/cache/prefetch/meta.json deleted file mode 100644 index 397de74..0000000 --- a/cache/prefetch/meta.json +++ /dev/null @@ -1 +0,0 @@ -{"lastUpdated":"2025-10-24T15:58:00Z"} \ No newline at end of file diff --git a/cache/prefetch/prefetch_status.json b/cache/prefetch/prefetch_status.json deleted file mode 100644 index f4bc963..0000000 --- a/cache/prefetch/prefetch_status.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "baseURL": "http://127.0.0.1:8080/api/v1", - "duration_ms": 34, - "endpoints": [ - { - "path": "/settings", - "file": "settings.json", - "ok": true - }, - { - "path": "/articles?page=1\u0026page_size=10\u0026published=true", - "file": "articles.json", - "ok": true - }, - { - "path": "/sponsors", - "file": "sponsors.json", - "ok": true - }, - { - "path": "/events/upcoming", - "file": "events_upcoming.json", - "ok": true - }, - { - "path": "/public/team-logo-overrides", - "file": "team_logo_overrides.json", - "ok": true - }, - { - "path": "/competition-aliases", - "file": "competition_aliases.json", - "ok": true - } - ], - "lastUpdated": "2025-10-24T15:58:00Z" -} \ No newline at end of file diff --git a/cache/prefetch/settings.json b/cache/prefetch/settings.json deleted file mode 100644 index cd26240..0000000 --- a/cache/prefetch/settings.json +++ /dev/null @@ -1 +0,0 @@ -{"about_html":"","accent_color":"#e53e3e","background_color":"#ffffff","club_id":"","club_logo_url":"","club_name":"","club_type":"","club_url":"","contact_address":"","contact_city":"","contact_country":"","contact_email":"","contact_phone":"","contact_zip":"","custom_nav":null,"facebook_url":"","font_body":"Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif","font_heading":"Poppins, sans-serif","gallery_label":"","gallery_url":"","instagram_url":"","location_latitude":0,"location_longitude":0,"map_style":"","map_zoom_level":0,"merch_items":null,"merch_limit":0,"merch_module_enabled":false,"merch_source":"","merch_style":"","primary_color":"#1a365d","secondary_color":"#2b6cb0","show_about_in_nav":false,"show_map_on_homepage":false,"sponsors_layout":"","sponsors_theme":"","text_color":"#1a202c","videos":null,"videos_items":null,"videos_limit":6,"videos_module_enabled":false,"videos_source":"auto","videos_style":"slider","youtube_url":""} \ No newline at end of file diff --git a/cache/prefetch/settings.json.hdr b/cache/prefetch/settings.json.hdr deleted file mode 100644 index 80f2695..0000000 --- a/cache/prefetch/settings.json.hdr +++ /dev/null @@ -1 +0,0 @@ -{"etag":"","fetched_at":"2025-10-24T15:58:00Z","last_modified":""} \ No newline at end of file diff --git a/cache/prefetch/sponsors.json b/cache/prefetch/sponsors.json deleted file mode 100644 index 0637a08..0000000 --- a/cache/prefetch/sponsors.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/cache/prefetch/sponsors.json.hdr b/cache/prefetch/sponsors.json.hdr deleted file mode 100644 index 80f2695..0000000 --- a/cache/prefetch/sponsors.json.hdr +++ /dev/null @@ -1 +0,0 @@ -{"etag":"","fetched_at":"2025-10-24T15:58:00Z","last_modified":""} \ No newline at end of file diff --git a/cache/prefetch/team_logo_overrides.json b/cache/prefetch/team_logo_overrides.json deleted file mode 100644 index 9f1fc78..0000000 --- a/cache/prefetch/team_logo_overrides.json +++ /dev/null @@ -1 +0,0 @@ -{"by_name":{}} \ No newline at end of file diff --git a/cache/prefetch/team_logo_overrides.json.hdr b/cache/prefetch/team_logo_overrides.json.hdr deleted file mode 100644 index 80f2695..0000000 --- a/cache/prefetch/team_logo_overrides.json.hdr +++ /dev/null @@ -1 +0,0 @@ -{"etag":"","fetched_at":"2025-10-24T15:58:00Z","last_modified":""} \ No newline at end of file diff --git a/frontend/src/components/admin/AdminSidebar.tsx b/frontend/src/components/admin/AdminSidebar.tsx index dd866f6..10c37d7 100644 --- a/frontend/src/components/admin/AdminSidebar.tsx +++ b/frontend/src/components/admin/AdminSidebar.tsx @@ -36,6 +36,7 @@ import { useAuth } from '../../contexts/AuthContext'; import { useQuery } from '@tanstack/react-query'; import { getUpcomingEvents } from '../../services/eventService'; import { getAllNavigationItems, NavigationItem, seedDefaultNavigation } from '../../services/navigation'; +import { usePublicSettings } from '../../hooks/usePublicSettings'; interface NavItemProps { icon: any; @@ -157,6 +158,7 @@ const AdminSidebar = ({ borderColor: borderColorProp }: AdminSidebarProps) => { const { logout, user } = useAuth(); + const { data: publicSettings } = usePublicSettings(); const isAdmin = (user as any)?.role === 'admin'; const defaultBg = useColorModeValue('white', '#1a1d29'); const defaultBorderColor = useColorModeValue('gray.200', 'rgba(255, 255, 255, 0.12)'); @@ -285,7 +287,7 @@ const AdminSidebar = ({ Club Logo { + console.error('Proxy error for /api:', err); + }, + }) + ); + // Proxy /static requests to backend (for any static assets served by Go) app.use( '/static',