modal create button working
This commit is contained in:
@@ -5,6 +5,10 @@ import { IoTimer } from "react-icons/io5";
|
|||||||
import { BsThreeDots } from "react-icons/bs";
|
import { BsThreeDots } from "react-icons/bs";
|
||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
import CreateRoom from "../Modals/CreateRoom";
|
import CreateRoom from "../Modals/CreateRoom";
|
||||||
|
import {
|
||||||
|
ShowModalType,
|
||||||
|
useKeyboardContext,
|
||||||
|
} from "../../contexts/keyboardContext";
|
||||||
|
|
||||||
enum RoomTypeFilter {
|
enum RoomTypeFilter {
|
||||||
all = "all",
|
all = "all",
|
||||||
@@ -21,6 +25,8 @@ enum RoomTimeFilter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default function DashboardRoom() {
|
export default function DashboardRoom() {
|
||||||
|
const { handleModalType } = useKeyboardContext();
|
||||||
|
|
||||||
// get rooms data realtime
|
// get rooms data realtime
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
/**
|
/**
|
||||||
@@ -57,7 +63,11 @@ export default function DashboardRoom() {
|
|||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span className="text-gray-300 hover:text-white hover:cursor-pointer">
|
<span className="text-gray-300 hover:text-white hover:cursor-pointer">
|
||||||
Live
|
Me
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span className="text-gray-300 hover:text-white hover:cursor-pointer">
|
||||||
|
Now
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span className="text-gray-300 hover:text-white hover:cursor-pointer">
|
<span className="text-gray-300 hover:text-white hover:cursor-pointer">
|
||||||
@@ -69,7 +79,7 @@ export default function DashboardRoom() {
|
|||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span className="text-gray-300 hover:text-white hover:cursor-pointer">
|
<span className="text-gray-300 hover:text-white hover:cursor-pointer">
|
||||||
Expired
|
Archive
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
@@ -77,7 +87,10 @@ export default function DashboardRoom() {
|
|||||||
Week <FaAngleDown />
|
Week <FaAngleDown />
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<button className="bg-gray-300 bg-opacity-25 p-2 rounded hover:bg-opacity-40">
|
<button
|
||||||
|
onClick={() => handleModalType(ShowModalType.createRoom)}
|
||||||
|
className="bg-gray-300 bg-opacity-25 p-2 rounded hover:bg-opacity-40"
|
||||||
|
>
|
||||||
<FaPlus className="text-lg text-white" />
|
<FaPlus className="text-lg text-white" />
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
|||||||
@@ -66,9 +66,22 @@ export default function CreateRoomModal() {
|
|||||||
<div className="flex flex-col">
|
<div className="flex flex-col">
|
||||||
<span className="flex flex-col items-start">
|
<span className="flex flex-col items-start">
|
||||||
<span className="text-md">Link</span>
|
<span className="text-md">Link</span>
|
||||||
<span className="text-gray-300 text-xs mb-2">
|
{roomLink ? (
|
||||||
Please make sure this is valid so that your team can join properly.
|
<span className="text-gray-300 text-xs mb-2">
|
||||||
</span>
|
Please make sure this is valid so that your team can join
|
||||||
|
properly.
|
||||||
|
</span>
|
||||||
|
) : (
|
||||||
|
<a
|
||||||
|
href="https://meet.google.com"
|
||||||
|
target={"_blank"}
|
||||||
|
rel={"noreferrer"}
|
||||||
|
className="text-xs mb-2"
|
||||||
|
>
|
||||||
|
Click here to create one.
|
||||||
|
</a>
|
||||||
|
)}
|
||||||
|
|
||||||
<input
|
<input
|
||||||
className="w-full rounded-lg bg-gray-50 p-3"
|
className="w-full rounded-lg bg-gray-50 p-3"
|
||||||
value={roomLink}
|
value={roomLink}
|
||||||
|
|||||||
Reference in New Issue
Block a user