add client online

This commit is contained in:
AmirHossein Mahmoodi
2025-05-26 15:35:04 +03:30
parent 1fb3c6f474
commit 835c673461
3 changed files with 27 additions and 1 deletions

View File

@@ -1,9 +1,11 @@
import DashboardPage from "@/components/dashboard/dashboard";
export const metadata = {
title: "پیشخوان",
};
const Page = () => {
return <></>;
return <DashboardPage />;
};
export default Page;

View File

@@ -0,0 +1,12 @@
import { useSocket } from "@/lib/contexts/socket";
import { Stack } from "@mui/material";
const OnlineUsersReport = () => {
const { clientsOnline } = useSocket();
return (
<Stack>
clientsOnline: {clientsOnline.length}
</Stack>
)
}
export default OnlineUsersReport;

View File

@@ -0,0 +1,12 @@
"use client"
import { Stack } from "@mui/material";
import OnlineUsersReport from "./OnlineUsersReport";
const DashboardPage = () => {
return (
<Stack>
<OnlineUsersReport />
</Stack>
)
}
export default DashboardPage;