import { default as classNames } from "classnames" import style from "./renderer.module.css" import { useDefinedContext } from "../../utils/definedContext" import { PostcardContext, PostcardVisibility } from "./base" import { LegacyRef, useEffect, useRef, useState } from "react" import { asleep } from "../../utils/asleep" export function PostcardRenderer() { const { previousSrc, currentSrc, visibility } = useDefinedContext(PostcardContext) const currentRef: LegacyRef = useRef(null) useEffect( () => { if (currentRef.current) { currentRef.current.animate( [ { opacity: 0 }, { opacity: 1 }, ], { duration: 1000 } ) } }, [currentRef, currentSrc] ) return <> }