add client online
This commit is contained in:
@@ -1,9 +1,11 @@
|
|||||||
|
import DashboardPage from "@/components/dashboard/dashboard";
|
||||||
|
|
||||||
export const metadata = {
|
export const metadata = {
|
||||||
title: "پیشخوان",
|
title: "پیشخوان",
|
||||||
};
|
};
|
||||||
|
|
||||||
const Page = () => {
|
const Page = () => {
|
||||||
return <></>;
|
return <DashboardPage />;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Page;
|
export default Page;
|
||||||
|
|||||||
@@ -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;
|
||||||
12
src/components/dashboard/dashboard/index.jsx
Normal file
12
src/components/dashboard/dashboard/index.jsx
Normal 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;
|
||||||
Reference in New Issue
Block a user