import { useRef, useState } from "react"; import { Swiper, SwiperSlide } from "swiper/react"; import type { Swiper as SwiperType } from "swiper"; import Image from "@/components/Image"; import Icon from "@/components/Icon"; import Button from "@/components/Button"; import "swiper/css"; import "swiper/css/navigation"; import { Navigation } from "swiper/modules"; import { items } from "./items"; const VoiceChat = ({}) => { const swiperRef = useRef(null); const [isBeginning, setIsBeginning] = useState(false); const [isEnd, setIsEnd] = useState(false); const [isListening, setIsListening] = useState(false); const handlePrev = () => { if (swiperRef.current) { swiperRef.current.slidePrev(); } }; const handleNext = () => { if (swiperRef.current) { swiperRef.current.slideNext(); } }; const handleSlideChange = (swiper: SwiperType) => { setIsBeginning(swiper.isBeginning); setIsEnd(swiper.isEnd); }; return isListening ? ( <>
I’m listing now...
"I’ve been trying to log into my account, but every time I enter my credentials, I get an error message saying 'Invalid Password.' I’m 100% sure I’m using the correct password since it worked just fine yesterday.{" "} To resolve this, I tried the 'Forgot Password' option, but I haven’t received any password reset email yet (I’ve checked my spam/junk folders too)."
AI Voice
) : ( <>
AI Voice
Choose a voice
{ swiperRef.current = swiper; setIsBeginning(swiper.isBeginning); setIsEnd(swiper.isEnd); }} onSlideChange={handleSlideChange} breakpoints={{ 768: { spaceBetween: 38, }, }} > {items.map((item) => ( setIsListening(true)} >
{item.title}
{item.description}
))}
{!isBeginning && ( )} {!isEnd && ( )}
); }; export default VoiceChat;