diff --git a/packages/samples/react/src/App.tsx b/packages/samples/react/src/App.tsx index 78e7a7ce3b..de38b47881 100644 --- a/packages/samples/react/src/App.tsx +++ b/packages/samples/react/src/App.tsx @@ -3,9 +3,9 @@ import { Navigate, Route, Routes, useSearchParams } from 'react-router-dom'; import { Route as MyRoute, Routes as MyRoutes } from './shares/types'; import { Option } from '@public-ui/components'; -import { KolAlert } from '@public-ui/react'; +import { KolAlert, KolBadge } from '@public-ui/react'; import { ROUTES } from './shares/routes'; -import { Theme, THEME_OPTIONS } from './shares/theme'; +import { isDraftTheme, Theme, THEME_OPTIONS } from './shares/theme'; import PackageJson from '@public-ui/components/package.json'; import { getTheme, getThemeName, setStorage, setTheme } from './shares/store'; import { Sidebar } from './components/Sidebar'; @@ -103,7 +103,7 @@ ROUTE_LIST.forEach((route) => { export const App: FC = () => { const routerLocation = useLocation(); const [searchParams, setSearchParams] = useSearchParams(); - const theme = searchParams.get('theme') ?? getTheme(); + const theme: Theme = (searchParams.get('theme') as Theme) ?? getTheme(); const hideMenus = searchParams.has('hideMenus'); setTheme(theme as Theme); // set for `getTheme` usages within the application @@ -133,6 +133,7 @@ export const App: FC = () => { )}