chore: Refactor route components for better organization and consistency
This commit is contained in:
35
src/routes/chrome.tsx
Normal file
35
src/routes/chrome.tsx
Normal file
@@ -0,0 +1,35 @@
|
||||
import { Route, Routes } from "react-router-dom"
|
||||
import OptionIndex from "./option-index"
|
||||
import OptionSettings from "./option-settings"
|
||||
import OptionModal from "./option-settings-model"
|
||||
import OptionPrompt from "./option-settings-prompt"
|
||||
import OptionOllamaSettings from "./options-settings-ollama"
|
||||
import OptionShare from "./option-settings-share"
|
||||
import OptionKnowledgeBase from "./option-settings-knowledge"
|
||||
import OptionAbout from "./option-settings-about"
|
||||
import SidepanelChat from "./sidepanel-chat"
|
||||
import SidepanelSettings from "./sidepanel-settings"
|
||||
|
||||
export const OptionRoutingChrome = () => {
|
||||
return (
|
||||
<Routes>
|
||||
<Route path="/" element={<OptionIndex />} />
|
||||
<Route path="/settings" element={<OptionSettings />} />
|
||||
<Route path="/settings/model" element={<OptionModal />} />
|
||||
<Route path="/settings/prompt" element={<OptionPrompt />} />
|
||||
<Route path="/settings/ollama" element={<OptionOllamaSettings />} />
|
||||
<Route path="/settings/share" element={<OptionShare />} />
|
||||
<Route path="/settings/knowledge" element={<OptionKnowledgeBase />} />
|
||||
<Route path="/settings/about" element={<OptionAbout />} />
|
||||
</Routes>
|
||||
)
|
||||
}
|
||||
|
||||
export const SidepanelRoutingChrome = () => {
|
||||
return (
|
||||
<Routes>
|
||||
<Route path="/" element={<SidepanelChat />} />
|
||||
<Route path="/settings" element={<SidepanelSettings />} />
|
||||
</Routes>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user