"use client"; import { useState } from "react"; import { useLotteryAuth } from "@/store/useLotteryAuth"; import ProtectedRoute from "@/components/lottery/auth/ProtectedRoute"; import LotteryHeader from "@/components/lottery/LotteryHeader"; import LotteryWinnersSection from "@/components/lottery/LotteryWinnersSection"; import LotteryRulesSection from "@/components/lottery/rules/LotteryRulesSection"; import LotteryCountDown from "@/components/lottery/countDown/LotteryCountDown"; import LotteryCountDownAllert from "@/components/lottery/countDown/countDownAllert/LotteryCountDownAllert"; const LotteryPage = () => { const { lotteryData } = useLotteryAuth(); const [status, setStatus] = useState<"not-started" | "started" | "ended">( "not-started" ); return (
{lotteryData && (
{status === "not-started" ? (
) : null}
)} {lotteryData && (status === "ended" || status === "started") && (
)}
); }; export default LotteryPage;