import { useSocket } from "@/lib/contexts/socket";
import { Power, PowerOff } from "@mui/icons-material";
import { Stack } from "@mui/material";

const OnlineCell = ({ user_id }) => {
    const { clientsOnline } = useSocket();
    return (
        <Stack alignItems={"center"}>
            {clientsOnline.some((co) => co.user_id == user_id) ? <Power color="success" /> : <PowerOff color="error" />}
        </Stack>
    );
};
export default OnlineCell;
