This commit is contained in:
Carl-Gerhard Lindesvärd
2024-02-04 13:23:21 +01:00
parent 30af9cab2f
commit ccd1a1456f
135 changed files with 5588 additions and 1758 deletions

View File

@@ -2,6 +2,7 @@ import { getSession } from '@/server/auth';
import { getRecentDashboardsByUserId } from '@/server/services/dashboard.service';
import { getOrganizations } from '@/server/services/organization.service';
import Auth from '../auth';
import { LayoutSidebar } from './layout-sidebar';
interface AppLayoutProps {
@@ -15,8 +16,12 @@ export default async function AppLayout({ children }: AppLayoutProps) {
? await getRecentDashboardsByUserId(session?.user.id)
: [];
if (!session) {
return <Auth />;
}
return (
<div>
<div id="dashboard">
<LayoutSidebar {...{ organizations, recentDashboards }} />
<div className="lg:pl-72 transition-all">{children}</div>
</div>