improve copilot + fix minor bugs

This commit is contained in:
Ishaan Dey
2024-05-26 18:04:43 -07:00
parent fbb98ac3b0
commit 6285a68102
7 changed files with 57 additions and 47 deletions

View File

@ -7,11 +7,18 @@ import {
} from "@/liveblocks.config"
import { colors } from "@/lib/colors"
export function Cursors({ yProvider }: { yProvider: TypedLiveblocksProvider }) {
export function Cursors({
yProvider,
userInfo,
}: {
yProvider: TypedLiveblocksProvider
userInfo: {
name: string
email: string
color: "red" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink"
}
}) {
// Get user info from Liveblocks authentication endpoint
const userInfo = useSelf((me) => me.info)
if (!userInfo) return null
const [awarenessUsers, setAwarenessUsers] = useState<AwarenessList>([])