mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 08:23:34 +00:00
Only navigate to preferences on desktop
This commit is contained in:
2 files changed
+7
-3
No files matched your search
+3
-2
@@ -1,10 +1,11 @@
|
||||
import { BrowserRouter, HashRouter, Route, Routes, Navigate } from "react-router-dom";
|
||||
import { BrowserRouter, HashRouter, Route, Routes } from "react-router-dom";
|
||||
import { ScrollToTop } from "./components/ScrollToTop";
|
||||
import { SessionMonitor } from "./components/SessionMonitor";
|
||||
import { URLFragmentHandler } from "./components/URLFragmentHandler";
|
||||
|
||||
import Index from "./pages/Index";
|
||||
import Clone from "./pages/Clone";
|
||||
import Settings from "./pages/Settings";
|
||||
import Preferences from "./pages/Preferences";
|
||||
import NostrSettings from "./pages/NostrSettings";
|
||||
import AISettings from "./pages/AISettings";
|
||||
@@ -41,7 +42,7 @@ export function AppRouter() {
|
||||
<Route path="/oauth/vercel" element={<VercelOAuth />} />
|
||||
<Route path="/oauth/openrouter" element={<OpenRouterOAuth />} />
|
||||
<Route path="/settings" element={<SettingsLayout />}>
|
||||
<Route index element={<Navigate to="/settings/preferences" replace />} />
|
||||
<Route index element={<Settings />} />
|
||||
<Route path="preferences" element={<Preferences />} />
|
||||
<Route path="nostr" element={<NostrSettings />} />
|
||||
<Route path="ai" element={<AISettings />} />
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { Navigate, useNavigate } from 'react-router-dom';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useIsMobile } from '@/hooks/useIsMobile';
|
||||
import { getSettingsCategories } from '@/lib/settingsItems';
|
||||
@@ -41,6 +41,9 @@ export function Settings() {
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
// On desktop, redirect to preferences
|
||||
return <Navigate to="/settings/preferences" replace />;
|
||||
}
|
||||
|
||||
export default Settings;
|
||||
Reference in new issue
Block a user