import App from '@/App'
import ChoreEdit from '@/views/ChoreEdit/ChoreEdit'
import Error from '@/views/Error'
import AccountSettings from '@/views/Settings/AccountSettings'
import AdvancedSettings from '@/views/Settings/AdvancedSettings'
import ChildUserSettings from '@/views/Settings/ChildUserSettings'
import CircleSettings from '@/views/Settings/CircleSettings'
import DeveloperSettings from '@/views/Settings/DeveloperSettings'
import Settings from '@/views/Settings/Settings'
import SettingsOverview from '@/views/Settings/SettingsOverview'
import SettingsRoutes from '@/views/Settings/SettingsRoutes'
import ThemeSettings from '@/views/Settings/ThemeSettings'
import { RouterProvider, createBrowserRouter } from 'react-router-dom'
import AuthenticationLoading from '../views/Authorization/Authenticating'
import ForgotPasswordView from '../views/Authorization/ForgotPasswordView'
import LoginSettings from '../views/Authorization/LoginSettings'
import LoginView from '../views/Authorization/LoginView'
import SignupView from '../views/Authorization/Signup'
import UpdatePasswordView from '../views/Authorization/UpdatePasswordView'
import ChoreView from '../views/ChoreEdit/ChoreView'
import ArchivedTasks from '../views/Chores/ArchivedTasks'
import MyChores from '../views/Chores/MyChores'
import JoinCircleView from '../views/Circles/JoinCircle'
import NotFound from '../views/components/NotFound'
import FilterView from '../views/Filters/FilterView'
import ChoreHistory from '../views/History/ChoreHistory'
import LabelView from '../views/Labels/LabelView'
import Landing from '../views/Landing/Landing'
import PaymentCancelledView from '../views/Payments/PaymentFailView'
import PaymentSuccessView from '../views/Payments/PaymentSuccessView'
import PrivacyPolicyView from '../views/PrivacyPolicy/PrivacyPolicyView'
import ProjectView from '../views/Projects/ProjectView'
import APITokenSettings from '../views/Settings/APITokenSettings'
import LocalizationSettings from '../views/Settings/LocalizationSettings'
import MFASettings from '../views/Settings/MFASettings'
import NotificationSetting from '../views/Settings/NotificationSetting'
import ProfileSettings from '../views/Settings/ProfileSettings'
import SidepanelSettings from '../views/Settings/SidepanelSettings'
import StorageSettings from '../views/Settings/StorageSettings'
import TermsView from '../views/Terms/TermsView'
import TestView from '../views/TestView/Test'
import ThingsHistory from '../views/Things/ThingsHistory'
import ThingsView from '../views/Things/ThingsView'
import TimerDetails from '../views/Timer/TimerDetails'
import UserActivities from '../views/User/UserActivities'
import UserPoints from '../views/User/UserPoints'
const getMainRoute = () => {
if (
// if domain is www.donetick.com or donetick.com then show landing page:
window.location.hostname === 'www.donetick.com' ||
window.location.hostname === 'donetick.com'
) {
return
}
return
}
const Router = createBrowserRouter([
{
path: '/',
element: ,
errorElement: ,
children: [
{
path: '/',
element: getMainRoute(),
},
{
path: '/settings',
element: ,
children: [
{
index: true,
element: ,
},
{
path: 'detailed',
element: ,
},
{
path: 'profile',
element: ,
},
{
path: 'circle',
element: ,
},
{
path: 'account',
element: ,
},
{
path: 'subaccounts',
element: ,
},
{
path: 'notifications',
element: ,
},
{
path: 'mfa',
element: ,
},
{
path: 'apitokens',
element: ,
},
{
path: 'storage',
element: ,
},
{
path: 'sidepanel',
element: ,
},
{
path: 'theme',
element: ,
},
{
path: 'localization',
element: ,
},
{
path: 'advanced',
element: ,
},
{
path: 'developer',
element: ,
},
],
},
{
path: '/chores',
element: ,
},
{
path: '/archived',
element: ,
},
{
path: '/chores/:choreId/edit',
element: ,
},
{
path: '/chores/:choreId',
element: ,
},
{
path: '/chores/create',
element: ,
},
{
path: '/chores/:choreId/history',
element: ,
},
{
path: '/chores/:choreId/timer',
element: ,
},
{
path: '/my/chores',
element: ,
},
{
path: '/activities',
element: ,
},
{
path: '/points',
element: ,
},
{
path: '/login',
element: ,
},
{
path: '/login/settings',
element: ,
},
{
path: '/signup',
element: ,
},
{
path: '/auth/:provider',
element: ,
},
{
path: '/welcome',
element: ,
},
{
path: '/test',
element: ,
},
{
path: '/forgot-password',
element: ,
},
{
path: '/password/update',
element: ,
},
{
path: '/privacy',
element: ,
},
{
path: '/terms',
element: ,
},
{
path: 'circle/join',
element: ,
},
{
path: 'payments/success',
element: ,
},
{
path: 'payments/cancel',
element: ,
},
{
path: 'things',
element: ,
},
{
path: 'things/:id',
element: ,
},
{
path: 'labels/',
element: ,
},
{
path: 'projects/',
element: ,
},
{
path: 'filters/',
element: ,
},
{
path: '*',
element: ,
},
],
},
])
const RouterContext = ({ children }) => {
return
}
export default RouterContext