refactor(routing): Update App.tsx routing and import structure

- Moved Header component from @/components/common to @/components/layout
- Updated routes import to include RouteConfig type
- Added type annotation for route mapping to improve type safety
- Adjusted import paths for better project organization
This commit is contained in:
lintsinghua 2025-10-22 16:47:07 +08:00
parent 7353205199
commit 65520d1ca1
1 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,7 @@
import { BrowserRouter, Routes, Route, Navigate } from "react-router-dom";
import { Toaster } from "sonner";
import Header from "@/components/common/Header";
import routes from "./routes";
import Header from "@/components/layout/Header";
import routes, { type RouteConfig } from "./app/routes";
function App() {
return (
@ -11,7 +11,7 @@ function App() {
<Header />
<main className="container-responsive py-4 md:py-6">
<Routes>
{routes.map((route) => (
{routes.map((route: RouteConfig) => (
<Route
key={route.path}
path={route.path}