chore: cleanup useEffect

This commit is contained in:
Ephraim Atta-Duncan
2025-08-21 21:58:14 +00:00
parent 231ef9c27e
commit db4d33d039
55 changed files with 637 additions and 643 deletions

View File

@@ -1,5 +1,3 @@
import { useEffect } from 'react';
import { Outlet, useNavigate } from 'react-router';
import { OrganisationProvider } from '@documenso/lib/client-only/providers/organisation';
@@ -30,13 +28,8 @@ export default function Layout() {
const currentOrganisation = organisations[0];
const team = currentOrganisation?.teams[0] || null;
useEffect(() => {
if (!isPersonalLayoutMode || !team) {
void navigate('/settings/profile');
}
}, []);
if (!isPersonalLayoutMode || !team) {
void navigate('/settings/profile');
return null;
}