"use client";
import { useEffect, useState } from "react";
import Link from "next/link";
import Image from "next/image";
import { notFound } from "next/navigation";
import useRoomMeeting from "../../[roomName]/useRoomMeeting";
import dynamic from "next/dynamic";
const WherebyEmbed = dynamic(() => import("../../lib/WherebyEmbed"), {
ssr: false,
});
export type WebinarDetails = {
params: {
title: string;
};
};
export type Webinar = {
title: string;
startsAt: string;
endsAt: string;
};
enum WebinarStatus {
Upcoming = "upcoming",
Live = "live",
Ended = "ended",
}
const ROOM_NAME = "webinar";
const WEBINARS: Webinar[] = [
{
title: "ai-operational-assistant",
startsAt: "2025-02-05T17:00:00Z", // 12pm EST
endsAt: "2025-02-05T18:00:00Z",
},
{
title: "ai-operational-assistant-dry-run",
startsAt: "2025-02-04T16:00:00Z",
endsAt: "2025-02-04T17:00:00Z",
},
];
export default function WebinarPage(details: WebinarDetails) {
const title = details.params.title;
const webinar = WEBINARS.find((webinar) => webinar.title === title);
if (!webinar) {
return notFound();
}
const startDate = new Date(Date.parse(webinar.startsAt));
const endDate = new Date(Date.parse(webinar.endsAt));
const meeting = useRoomMeeting(ROOM_NAME);
const roomUrl = meeting?.response?.host_room_url
? meeting?.response?.host_room_url
: meeting?.response?.room_url;
const [status, setStatus] = useState(WebinarStatus.Ended);
const [countdown, setCountdown] = useState({
days: 0,
hours: 0,
minutes: 0,
seconds: 0,
});
useEffect(() => {
const updateCountdown = () => {
const now = new Date();
if (now < startDate) {
setStatus(WebinarStatus.Upcoming);
const difference = startDate.getTime() - now.getTime();
setCountdown({
days: Math.floor(difference / (1000 * 60 * 60 * 24)),
hours: Math.floor((difference / (1000 * 60 * 60)) % 24),
minutes: Math.floor((difference / 1000 / 60) % 60),
seconds: Math.floor((difference / 1000) % 60),
});
} else if (now < endDate) {
setStatus(WebinarStatus.Live);
}
};
updateCountdown();
const timer = setInterval(updateCountdown, 1000);
return () => clearInterval(timer);
}, [webinar]);
if (status === WebinarStatus.Live) {
return <>{roomUrl &&
From Simple Automation to Strategic Implementation
The hype around Al agents might be a little premature. But operational assistants are very real, available today, and can unlock your team to do their best work.
In this session,{" "} Monadical {" "} cofounder Max McCrea dives into what operational assistants are and how you can implement them in your organization to deliver real, tangible value.
You'll walk away with a clear understanding of how to implement Al solutions in your organization, with several demos of actual implementations.
Capture the signal, not the noise
From Simple Automation to Strategic Implementation
Wednesday, February 5th @ 12pm EST
AI is ready to deliver value to your organization, but it's not ready to act autonomously. The highest-value applications of AI today are assistants, which significantly increase the efficiency of workers in operational roles. Software companies are reporting 30% improvements in developer output across the board, and there's no reason AI can't deliver the same kind of value to workers in other roles.
In this session,{" "} Monadical {" "} cofounder Max McCrea will dive into what operational assistants are and how you can implement them in your organization to deliver real, tangible value.
Plan to walk away with a clear understanding of how to implement AI solutions in your organization, with live demos of actual implementations and plenty of time for Q&A to address your specific challenges.
RSVP HERECapture the signal, not the noise