diff --git a/src/routes.tsx b/src/routes.tsx index f1b6f0a7..e3563e4e 100644 --- a/src/routes.tsx +++ b/src/routes.tsx @@ -1,6 +1,4 @@ /* eslint-disable no-nested-ternary */ -import { useContext } from 'react' - import { Navigate, Route, Routes } from 'react-router-dom' import App from '@/App' @@ -11,21 +9,11 @@ import AppearanceSettings from '@/components/settings/AppearanceSettings' import NotificationsSettings from '@/components/settings/NotificationsSettings' import SettingsLayout from '@/components/settings/SettingsLayout' import SupportSettings from '@/components/settings/SupportSettings' -import W3iContext from '@/contexts/W3iContext/context' import Login from '@/pages/Login' import ScanQrCode from '@/pages/ScanQrCode' -import WidgetConnect from '@/pages/widget/Connect' -import WidgetSubscribe from '@/pages/widget/Subscribe' const ConfiguredRoutes: React.FC = () => { - const { uiEnabled } = useContext(W3iContext) - - const defaultPage = - Object.entries({ - '/messages': uiEnabled.chat, - '/notifications': uiEnabled.notify, - '/settings': uiEnabled.settings - }).find(([_, enabled]) => enabled)?.[0] ?? '/login' + const defaultPage = '/notifications' return ( @@ -34,28 +22,19 @@ const ConfiguredRoutes: React.FC = () => { } /> }> - {uiEnabled.notify ? ( }> } /> } /> - ) : null} - {uiEnabled.settings ? ( }> } /> } /> } /> - ) : null} } /> - - } /> - } /> - - } /> )