From 228ba3b53667d4186977360da2ed350e15099112 Mon Sep 17 00:00:00 2001 From: Ilgeldi Date: Sat, 8 Feb 2025 15:09:54 +0500 Subject: [PATCH] first commit --- app/(main)/lotteryOld/auth/page.tsx | 13 ----- app/(main)/lotteryOld/page.tsx | 91 ----------------------------- 2 files changed, 104 deletions(-) delete mode 100644 app/(main)/lotteryOld/auth/page.tsx delete mode 100644 app/(main)/lotteryOld/page.tsx diff --git a/app/(main)/lotteryOld/auth/page.tsx b/app/(main)/lotteryOld/auth/page.tsx deleted file mode 100644 index 46eacee..0000000 --- a/app/(main)/lotteryOld/auth/page.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import LotteryAuthForm from "@/components/lottery/auth/LotteryAuthForm"; - -const LotteryAuthPage = () => { - return ( -
-
- {/* */} -
-
- ); -}; - -export default LotteryAuthPage; \ No newline at end of file diff --git a/app/(main)/lotteryOld/page.tsx b/app/(main)/lotteryOld/page.tsx deleted file mode 100644 index 363afdf..0000000 --- a/app/(main)/lotteryOld/page.tsx +++ /dev/null @@ -1,91 +0,0 @@ -"use client"; - -import { useEffect, 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 { Queries } from "@/api/queries"; -import Link from "next/link"; -import { useRouter } from "next/navigation"; -import Loader from "@/components/Loader"; -import { authenticateLottery } from "@/api"; -import { ILotteryResponse } from "@/models/lottery/lottery.model"; - -const LotteryPage = () => { - const [lotteryData, setData] = useState(); - const [status, setStatus] = useState<"not-started" | "started" | "ended">( - "not-started" - ); - const [isLoading, setIsLoading] = useState(true); - const router = useRouter(); - - useEffect(() => { - const checkAuth = async () => { - const res = await authenticateLottery(); - setData(res); - }; - - checkAuth(); - }, []); - - if (isLoading && !lotteryData?.data) { -
- -
; - } - - return ( - - {lotteryData?.data && ( -
- {lotteryData && ( -
- - - {status === "not-started" ? ( -
- -
- ) : null} -
- )} - - - -
- {lotteryData && (status === "ended" || status === "started") && ( - - )} -
-
- - Çykmak - -
-
-
-
- )} -
- ); -}; - -export default LotteryPage;