Sidebar and app layout structure

This commit is contained in:
2025-10-18 14:19:57 +02:00
parent 99af75ea25
commit 9483a7065b
9 changed files with 398 additions and 354 deletions
+3 -3
View File
@@ -1,7 +1,7 @@
"use client";
import MessageBox from "@/components/MessageBox";
import AppSidebar from "@/components/Sidebar";
import AppLayout from "@/components/app/AppLayout";
import { useParams } from "next/navigation";
import useApp from "@/hooks/use-app";
import { useEffect, useRef } from "react";
@@ -30,7 +30,7 @@ export default function DMs() {
}, [target]);
return (
<AppSidebar app={app}>
<AppLayout app={app}>
<MessageBox
app={app}
channelName={target?.display_name || id}
@@ -52,6 +52,6 @@ export default function DMs() {
);
}}
/>
</AppSidebar>
</AppLayout>
);
}
+3 -3
View File
@@ -2,7 +2,7 @@
import ProfilePicture from "@/components/ProfilePicture";
import SettingsDialog from "@/components/settings/SettingsDialog";
import AppSidebar from "@/components/Sidebar";
import AppLayout from "@/components/app/AppLayout";
import { Button } from "@/components/ui/button";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { Separator } from "@/components/ui/separator";
@@ -28,7 +28,7 @@ export default function ChatHub() {
const activeServers: Server[] = [];
return (
<AppSidebar app={app}>
<AppLayout app={app}>
<div className="h-svh w-full max-h-svh flex flex-col py-5 px-5 gap-5">
<motion.div
initial={{ opacity: 0, y: 10 }}
@@ -140,6 +140,6 @@ export default function ChatHub() {
</div>
</motion.div>
</div>
</AppSidebar>
</AppLayout>
);
}
+3 -3
View File
@@ -3,7 +3,7 @@
import { useRef, useState } from "react";
import { useParams } from "next/navigation";
import MessageBox from "@/components/MessageBox";
import AppSidebar from "@/components/Sidebar";
import AppLayout from "@/components/app/AppLayout";
import { Server as ServerType } from "@/types/types";
import auth from "@/lib/auth";
import { useServerMessages } from "@/hooks/use-messages";
@@ -35,7 +35,7 @@ export default function Server() {
);
return (
<AppSidebar app={app} server={server}>
<AppLayout app={app} server={server}>
<MessageBox
app={app}
channelName="General"
@@ -52,6 +52,6 @@ export default function Server() {
);
}}
/>
</AppSidebar>
</AppLayout>
);
}