mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-11 06:46:59 +08:00
fix: root route shows Agent page instead of LandingPage
- / now defaults to AgentChatPage (NOFXi's main interface) - Agent page accessible without login - LandingPage only shown at /landing or for non-agent pages when not logged in
This commit is contained in:
@@ -445,13 +445,15 @@ function App() {
|
|||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
// Show landing page for root route
|
// Root route → go to Agent (NOFXi 的主界面就是 Agent)
|
||||||
if (route === '/' || route === '') {
|
// Landing page only for explicit /landing
|
||||||
|
if (route === '/landing') {
|
||||||
return <LandingPage />
|
return <LandingPage />
|
||||||
}
|
}
|
||||||
|
|
||||||
// Redirect unauthenticated users to landing page
|
// Agent page is accessible without login
|
||||||
if (!user || !token) {
|
// Other pages redirect to landing if not authenticated
|
||||||
|
if ((!user || !token) && currentPage !== 'agent') {
|
||||||
return <LandingPage />
|
return <LandingPage />
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user