Update RoomCard.tsx
This commit is contained in:
+18
-8
@@ -5,7 +5,7 @@ import Room, { RoomStatus } from "../models/room";
|
|||||||
import RoomTypeTag from "./RoomTypeTag";
|
import RoomTypeTag from "./RoomTypeTag";
|
||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
import { useAuth } from "../contexts/authContext";
|
import { useAuth } from "../contexts/authContext";
|
||||||
import { Avatar, Divider, Dropdown, Menu, Tooltip } from "antd";
|
import { Avatar, Divider, Dropdown, Menu, Popover, Tooltip } from "antd";
|
||||||
import { UserOutlined, AntDesignOutlined } from "@ant-design/icons";
|
import { UserOutlined, AntDesignOutlined } from "@ant-design/icons";
|
||||||
import { useTeamDashboardContext } from "../contexts/teamDashboardContext";
|
import { useTeamDashboardContext } from "../contexts/teamDashboardContext";
|
||||||
import { User, UserStatus } from "../models/user";
|
import { User, UserStatus } from "../models/user";
|
||||||
@@ -213,6 +213,14 @@ export default function RoomCard(props: IRoomCardProps) {
|
|||||||
</Menu>
|
</Menu>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const AgendaContent = (
|
||||||
|
<div>
|
||||||
|
<span className="text-sm whitespace-pre-line">
|
||||||
|
{props.room.description}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<span
|
<span
|
||||||
className={`flex flex-col ${
|
className={`flex flex-col ${
|
||||||
@@ -230,13 +238,15 @@ export default function RoomCard(props: IRoomCardProps) {
|
|||||||
>
|
>
|
||||||
{props.room.name}
|
{props.room.name}
|
||||||
</span>
|
</span>
|
||||||
<span
|
<Popover content={AgendaContent} title="Agenda">
|
||||||
className={`${
|
<span
|
||||||
isUserInRoom ? "text-gray-400" : "text-gray-200"
|
className={`${
|
||||||
} text-xs overflow-wrap mb-2 text-ellipsis whitespace-pre-line `}
|
isUserInRoom ? "text-gray-400" : "text-gray-200"
|
||||||
>
|
} text-xs mb-2 text-ellipsis whitespace-pre-line max-h-10 overflow-hidden`}
|
||||||
{props.room.description}
|
>
|
||||||
</span>
|
{props.room.description}
|
||||||
|
</span>
|
||||||
|
</Popover>
|
||||||
|
|
||||||
{/* badges and tags */}
|
{/* badges and tags */}
|
||||||
{/* <span className="flex flex-row flex-wrap space-x-2">
|
{/* <span className="flex flex-row flex-wrap space-x-2">
|
||||||
|
|||||||
Reference in New Issue
Block a user