Replies: 1 comment
-
|
import { Card, CardContent } from "@/components/ui/card"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { useState, useEffect } from "react"; import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; import { Textarea } from "@/components/ui/textarea"; import { Select, SelectItem } from "@/components/ui/select"; export default function AITournamentApp() { const [roomInfo, setRoomInfo] = useState({ id: "", password: "" }); const [score, setScore] = useState(""); const [chat, setChat] = useState(""); const [matchTime, setMatchTime] = useState("20:00"); const [adminNotified, setAdminNotified] = useState(false); const [paymentAmount, setPaymentAmount] = useState(""); const [paymentMethod, setPaymentMethod] = useState("bKash"); const [transactionId, setTransactionId] = useState(""); useEffect(() => { const interval = setInterval(() => { const now = new Date(); const [hour, minute] = matchTime.split(":").map(Number); const matchDate = new Date(); matchDate.setHours(hour, minute, 0, 0); if (!adminNotified && Math.abs(now - matchDate) <= 60000) { return () => clearInterval(interval); }, [matchTime, adminNotified]); const generateRoom = () => { const newId = "FF" + Math.floor(100000 + Math.random() * 900000); const newPass = "AI_" + Math.random().toString(36).substring(2, 8); setRoomInfo({ id: newId, password: newPass }); }; const handlePayment = (type) => { if (!paymentAmount || !transactionId) { alert("অনুগ্রহ করে সম্পূর্ণ তথ্য দিন।"); return; } alert(✅ AI ${type === 'add' ? 'যোগ' : 'উইড্র'} করেছে: পরিমাণ: ${paymentAmount}৳ মাধ্যম: ${paymentMethod} ট্রাঞ্জেকশন আইডি: ${transactionId}); setPaymentAmount(""); setTransactionId(""); }; return ( AI Free Fire TournamentRegister Room Info Score Chat); } |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
import { Card, CardContent } from "@/components/ui/card"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { useState, useEffect } from "react"; import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; import { Textarea } from "@/components/ui/textarea"; import { Select, SelectItem } from "@/components/ui/select";
export default function AITournamentApp() { const [roomInfo, setRoomInfo] = useState({ id: "", password: "" }); const [score, setScore] = useState(""); const [chat, setChat] = useState(""); const [matchTime, setMatchTime] = useState("20:00"); const [adminNotified, setAdminNotified] = useState(false); const [paymentAmount, setPaymentAmount] = useState(""); const [paymentMethod, setPaymentMethod] = useState("bKash"); const [transactionId, setTransactionId] = useState("");
useEffect(() => { const interval = setInterval(() => { const now = new Date(); const [hour, minute] = matchTime.split(":").map(Number); const matchDate = new Date(); matchDate.setHours(hour, minute, 0, 0);
if (!adminNotified && Math.abs(now - matchDate) <= 60000) {
alert("🧠 AI: দয়া করে রুম তৈরি করুন এবং Room ID + Password আপডেট দিন।");
setAdminNotified(true);
generateRoom();
}
}, 30000);
return () => clearInterval(interval);
}, [matchTime, adminNotified]);
const generateRoom = () => { const newId = "FF" + Math.floor(100000 + Math.random() * 900000); const newPass = "AI_" + Math.random().toString(36).substring(2, 8); setRoomInfo({ id: newId, password: newPass }); };
const handlePayment = (type) => { if (!paymentAmount || !transactionId) { alert("অনুগ্রহ করে সম্পূর্ণ তথ্য দিন।"); return; } alert(✅ AI ${type === 'add' ? 'যোগ' : 'উইড্র'} করেছে: পরিমাণ: ${paymentAmount}৳ মাধ্যম: ${paymentMethod} ট্রাঞ্জেকশন আইডি: ${transactionId}); setPaymentAmount(""); setTransactionId(""); };
return (
AI Free Fire Tournament
Register Room Info Score Chat); }
Beta Was this translation helpful? Give feedback.
All reactions