import Link from 'next/link' import { AiIconAnimation, Button, Card, cn } from 'ui' import { AnimatedCursors } from './AnimatedCursors' import { SIDEBAR_KEYS } from '@/components/layouts/ProjectLayout/LayoutSidebar/LayoutSidebarProvider' import { DocsButton } from '@/components/ui/DocsButton' import { DOCS_URL } from '@/lib/constants' import { useAiAssistantStateSnapshot } from '@/state/ai-assistant-state' import { useSidebarManagerSnapshot } from '@/state/sidebar-manager-state' /** * Acts as a container component for the entire log display */ export const EmptyRealtime = ({ projectRef }: { projectRef: string }) => { const aiSnap = useAiAssistantStateSnapshot() const { openSidebar } = useSidebarManagerSnapshot() const handleCreateTriggerWithAssistant = () => { openSidebar(SIDEBAR_KEYS.AI_ASSISTANT) aiSnap.newChat({ name: `Realtime`, initialInput: `Help me set up a realtime experience for my project`, }) } return (
Send your first realtime message from your database, application code or edge function
} onClick={handleCreateTriggerWithAssistant} > Set up realtime for meSend messages to a channel from your client application or database via triggers.
Set up Row Level Security policies to control who can see messages within a channel
Receive realtime messages in your application by listening to a channel