mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-06 20:41:14 +08:00
feat: integrate NOFXi agent into dev
This commit is contained in:
@@ -22,6 +22,7 @@ import { FAQPage } from '../pages/FAQPage'
|
||||
import { LandingPage } from '../pages/LandingPage'
|
||||
import { BeginnerOnboardingPage } from '../pages/BeginnerOnboardingPage'
|
||||
import { DataPage } from '../pages/DataPage'
|
||||
import { AgentChatPage } from '../pages/AgentChatPage'
|
||||
import { SettingsPage } from '../pages/SettingsPage'
|
||||
import { StrategyMarketPage } from '../pages/StrategyMarketPage'
|
||||
import { StrategyStudioPage } from '../pages/StrategyStudioPage'
|
||||
@@ -456,6 +457,14 @@ export function AppRoutes() {
|
||||
</AppChrome>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path={ROUTES.agent}
|
||||
element={
|
||||
<AppChrome currentPage="agent" showFooter={false}>
|
||||
<AgentChatPage />
|
||||
</AppChrome>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path={ROUTES.data}
|
||||
element={
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
export type Page =
|
||||
| 'agent'
|
||||
| 'competition'
|
||||
| 'traders'
|
||||
| 'trader'
|
||||
@@ -11,6 +12,7 @@ export type Page =
|
||||
|
||||
export const ROUTES = {
|
||||
home: '/',
|
||||
agent: '/agent',
|
||||
login: '/login',
|
||||
register: '/register',
|
||||
setup: '/setup',
|
||||
@@ -27,6 +29,7 @@ export const ROUTES = {
|
||||
} as const
|
||||
|
||||
export const PAGE_PATHS: Record<Page, string> = {
|
||||
agent: ROUTES.agent,
|
||||
competition: ROUTES.competition,
|
||||
traders: ROUTES.traders,
|
||||
trader: ROUTES.dashboard,
|
||||
@@ -39,6 +42,7 @@ export const PAGE_PATHS: Record<Page, string> = {
|
||||
}
|
||||
|
||||
export const LEGACY_HASH_ROUTES: Record<string, string> = {
|
||||
agent: ROUTES.agent,
|
||||
competition: ROUTES.competition,
|
||||
traders: ROUTES.traders,
|
||||
trader: ROUTES.dashboard,
|
||||
@@ -50,6 +54,8 @@ export const LEGACY_HASH_ROUTES: Record<string, string> = {
|
||||
|
||||
export function getCurrentPageForPath(pathname: string): Page | undefined {
|
||||
switch (pathname) {
|
||||
case ROUTES.agent:
|
||||
return 'agent'
|
||||
case ROUTES.welcome:
|
||||
case ROUTES.traders:
|
||||
return 'traders'
|
||||
|
||||
Reference in New Issue
Block a user