updates on lottery page

This commit is contained in:
Kakabay 2025-01-16 18:39:22 +05:00
parent 0d6af89834
commit f6d1c4e0d3
3 changed files with 16 additions and 8 deletions

View File

@ -70,7 +70,7 @@ const LotteryPage = () => {
<Link
href="/lottery/auth"
className="sm:text-textLarge sm:leading-textLarge text-[16px] rounded-full leading-[24px] sm:py-[12px] py-[8px] w-full flex justify-center items-center border-2 border-lightPrimary hover:bg-lightPrimary font-medium text-lightPrimary hover:text-lightOnPrimary disabled:opacity-50 transition-all duration-300">
Täzeden girmek
Çykmak
</Link>
</div>
</div>

View File

@ -1,5 +1,10 @@
import { useLotteryAuth } from '@/store/useLotteryAuth';
interface IProps {
title: string;
content: string;
}
const LotteryRulesSection = () => {
const { lotteryData } = useLotteryAuth();
@ -17,11 +22,9 @@ const LotteryRulesSection = () => {
Umumy düzgünler:
</h3>
<ul className="list-disc flex flex-col md:gap-4 gap-2 pl-[16px]">
{Array(5)
.fill(' ')
.map((item, i) => (
{lotteryData?.data.rules?.map((item, i) => (
<li className="font-small-regular" key={i}>
Ilkinji we dogry jogap beren sanawda ilkinji ýeri eýelýär
{item.content}
</li>
))}
</ul>

View File

@ -5,6 +5,10 @@ export interface ILotteryWinner {
winner_no: number;
ticket: string;
}
export interface ILotteryRule {
title: string;
content: string;
}
export interface ILotteryData {
id: number;
@ -15,6 +19,7 @@ export interface ILotteryData {
end_time: string;
sms_code: string;
winners: ILotteryWinner[];
rules: ILotteryRule[] | null;
}
export interface ILotteryResponse {