fix: sync program status updates

This commit is contained in:
admin committed 2026-08-20 09:08:24 +08:00
1 parent ed62d42a63
commit 38bcbfc697
4 files changed
+40 -5

No files matched your search

+5 -2
View File
@@ -1,8 +1,9 @@
import { Component, lazy, Suspense, useState, useEffect, type ErrorInfo, type ReactNode } from 'react'
import { BrowserRouter, Routes, Route, Navigate } from 'react-router-dom'
import { BrowserRouter, Routes, Route, Navigate, useLocation } from 'react-router-dom'
import { Button, ConfigProvider, Result } from 'antd'
import zhCN from 'antd/locale/zh_CN'
import theme from './theme/anthropic'
import './pageTransitions.css'
import { BrandProvider, useBrand } from './brand/BrandContext'
import { verifyToken } from './api/auth'
import { getToken } from './api/client'
@@ -60,6 +61,8 @@ function AdminGuard({ children }: { children: React.ReactNode }) {
}
function AppRoutes() {
const location = useLocation()
const routeTransitionKey = location.pathname.startsWith('/admin') ? '/admin' : location.pathname
const { brand } = useBrand()
useEffect(() => { document.title = brand.brand_name }, [brand.brand_name])
return (
@@ -98,4 +101,4 @@ export default function App() {
</BrandProvider>
</ConfigProvider>
)
}
}