Files
twenty/packages/twenty-front/src/modules/app/components/AppRouter.tsx
T
Raphaël Bosi 3b868c3d2a Page layout refactoring (#14535)
In this PR:
- Refactored the page layout renderer
- Converted all the states to component states
- Removed the page layout edition in settings

TODOs in next PRs:
- Fix bug with the drag selector not taking the scroll into account to
display the dragged area
- Readd the tab edition in edit mode
2025-09-16 15:42:51 +00:00

22 lines
687 B
TypeScript

import { useCreateAppRouter } from '@/app/hooks/useCreateAppRouter';
import { currentUserState } from '@/auth/states/currentUserState';
import { RouterProvider } from 'react-router-dom';
import { useRecoilValue } from 'recoil';
export const AppRouter = () => {
// We want to disable serverless function settings but keep the code for now
const isFunctionSettingsEnabled = false;
const currentUser = useRecoilValue(currentUserState);
const isAdminPageEnabled =
(currentUser?.canImpersonate || currentUser?.canAccessFullAdminPanel) ??
false;
return (
<RouterProvider
router={useCreateAppRouter(isFunctionSettingsEnabled, isAdminPageEnabled)}
/>
);
};