This commit is contained in:
Kakabay 2024-12-20 18:21:18 +05:00
parent 6cabf5d1c9
commit 77f4ee0c48
2 changed files with 19 additions and 81 deletions

View File

@ -1,73 +0,0 @@
import LotteryWinnersSection from '@/components/lottery/LotteryWinnersSection';
import LotteryCountDown from '@/components/lottery/countDown/LotteryCountDown';
import Image from 'next/image';
interface IParams {
params: {
lottery_id: string;
};
}
const page = ({ params }: IParams) => {
return (
<div className="flex flex-col gap-[128px] font-roboto pt-[64px] pb-[128px] text-lightOnSurface">
<section className="">
<div className="container">
<div className="flex flex-col gap-[32px]">
<h1 className="font-display-1-regular text-center">Bije</h1>
<div className="mb-8">
<Image
src="/banner-lottery.jpg"
width={1416}
height={177}
alt="banner"
className="rounded-[12px]"
/>
</div>
<LotteryCountDown startDate="2024-11-25" />
</div>
</div>
</section>
<LotteryWinnersSection />
<section>
<div className="container">
<div className="flex flex-col gap-8">
<h2 className="font-heading-1-regular">Lotereýanyň duzgunleri:</h2>
<div className="flex gap-6">
<div className="flex flex-col gap-4 bg-lightSurfaceContainer py-4 px-8 rounded-[12px] w-full">
<h3 className="font-heading-5-regular">Umumy düzgünler:</h3>
<ul className="list-disc flex flex-col gap-4 pl-[16px]">
{Array(5)
.fill(' ')
.map((item, i) => (
<li className="font-small-regular" key={i}>
Ilkinji we dogry jogap beren sanawda ilkinji ýeri eýelýär
</li>
))}
</ul>
</div>
<div className="flex flex-col gap-4 bg-lightSurfaceContainer py-4 px-8 rounded-[12px] w-full">
<h3 className="font-heading-5-regular">Üns beriň:</h3>
<ul className="list-disc flex flex-col gap-4 pl-[16px]">
{Array(1)
.fill(' ')
.map((item, i) => (
<li className="font-small-regular" key={i}>
SMS = 1 manat
</li>
))}
</ul>
</div>
</div>
</div>
</div>
</section>
</div>
);
};
export default page;

View File

@ -4,6 +4,7 @@ import { Queries } from '@/api/queries';
import Loader from '@/components/Loader';
import LotteryWinnersSection from '@/components/lottery/LotteryWinnersSection';
import RollingCounter from '@/components/lottery/RollingCounter/RollingCounter';
import RollingCounterWorking from '@/components/lottery/RollingCounter/RollingCounterWorking';
import LotteryCountDown from '@/components/lottery/countDown/LotteryCountDown';
import LotteryCountDownAllert from '@/components/lottery/countDown/countDownAllert/LotteryCountDownAllert';
import LotteryForm from '@/components/lottery/form/LotteryForm';
@ -18,14 +19,23 @@ const page = () => {
const [lotteryStatus, setLotteryStatus] = useState<'not-started' | 'started' | 'ended'>(
'not-started',
);
const [currentNumber, setCurrentNumber] = useState('22-22-22-22-22');
useEffect(() => {
Queries.getLottery()
.then((res) => {
setData(res);
})
.finally(() => setIsLoading(false));
}, []);
// useEffect(() => {
// Queries.getLottery()
// .then((res) => {
// setData(res);
// })
// .finally(() => setIsLoading(false));
// }, []);
// useEffect(() => {
// const timer = setTimeout(() => {
// setCurrentNumber('81-34-52-35-61');
// }, 10000); // 15 seconds
// return () => clearTimeout(timer); // Cleanup on unmount
// }, []);
// if (isLoading) {
// return (
@ -37,7 +47,8 @@ const page = () => {
return (
<div className="flex flex-col md:gap-[128px] gap-[80px] font-roboto md:pt-[64px] sm:pt-[48px] pt-[40px] pb-[128px] text-lightOnSurface">
<RollingCounter numberString="8134523561" />
{/* <RollingCounter numberString={currentNumber} /> */}
<RollingCounterWorking numberString={currentNumber} />
{data && (
<section className="">