chore(init): 初始化解忧商行项目并完成 Phase 0 基座
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import { Route, Routes } from 'react-router-dom'
|
||||
|
||||
import { AdminPlaceholderPage } from '@/features/admin/AdminPlaceholderPage'
|
||||
import { LoginPage } from '@/features/auth/LoginPage'
|
||||
import { ListingListPage } from '@/features/listings/ListingListPage'
|
||||
import { NotFoundPage } from '@/features/NotFoundPage'
|
||||
import { StorefrontLayout } from '@/layouts/StorefrontLayout'
|
||||
|
||||
export function AppRouter() {
|
||||
const adminBase = import.meta.env.VITE_ADMIN_BASE_PATH || '/console-jy8k3m'
|
||||
|
||||
return (
|
||||
<Routes>
|
||||
<Route element={<StorefrontLayout />}>
|
||||
<Route index element={<ListingListPage />} />
|
||||
</Route>
|
||||
<Route path="/login" element={<LoginPage />} />
|
||||
<Route path={`${adminBase}/*`} element={<AdminPlaceholderPage />} />
|
||||
<Route path="*" element={<NotFoundPage />} />
|
||||
</Routes>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user