mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-07 04:50:57 +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>
|
||||
)
|
||||
}
|
||||
// Show landing page for root route
|
||||
if (route === '/' || route === '') {
|
||||
// Root route → go to Agent (NOFXi 的主界面就是 Agent)
|
||||
// Landing page only for explicit /landing
|
||||
if (route === '/landing') {
|
||||
return <LandingPage />
|
||||
}
|
||||
|
||||
// Redirect unauthenticated users to landing page
|
||||
if (!user || !token) {
|
||||
// Agent page is accessible without login
|
||||
// Other pages redirect to landing if not authenticated
|
||||
if ((!user || !token) && currentPage !== 'agent') {
|
||||
return <LandingPage />
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user