fix errors
This commit is contained in:
parent
714932d3f3
commit
6107dea9a5
|
|
@ -51,8 +51,8 @@ const LotteryMain = () => {
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
lotteryData?.data && (
|
lotteryData?.data && (
|
||||||
<div className="flex flex-col md:gap-[128px] gap-[80px] font-roboto md:pt-[64px] sm:pt-[48px] pt-[40px] ms:pb-[128px] pb-[80px] text-lightOnSurface">
|
<div className="flex flex-col font-roboto md:pt-[64px] sm:pt-[48px] pt-[40px] ms:pb-[128px] pb-[80px] text-lightOnSurface">
|
||||||
<div className="flex flex-col sm:gap-[64px] gap-[40px]">
|
<div className="flex flex-col sm:gap-[64px] gap-[40px] pb-[80px]">
|
||||||
<LotteryHeader
|
<LotteryHeader
|
||||||
title={lotteryData?.data.title}
|
title={lotteryData?.data.title}
|
||||||
description={lotteryData?.data.description}
|
description={lotteryData?.data.description}
|
||||||
|
|
@ -72,7 +72,7 @@ const LotteryMain = () => {
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<LotteryRulesSection data={lotteryData} />
|
<LotteryRulesSection data={lotteryData} />
|
||||||
<div className="flex flex-col gap-10">
|
<div className="flex flex-col gap-10 mt-[40px]">
|
||||||
<LotteryWinners data={lotteryData} lotteryStatus={status} />
|
<LotteryWinners data={lotteryData} lotteryStatus={status} />
|
||||||
<div className="w-full">
|
<div className="w-full">
|
||||||
<div className="container">
|
<div className="container">
|
||||||
|
|
|
||||||
|
|
@ -130,13 +130,13 @@ const LotteryWinnersSection = ({ data }: { data: any }) => {
|
||||||
|
|
||||||
<div className="container">
|
<div className="container">
|
||||||
<div
|
<div
|
||||||
className="flex flex-col items-center rounded-[32px] gap-[40px]"
|
className="flex flex-col items-center rounded-[32px] gap-[60px] pt-[20px]"
|
||||||
style={{
|
style={{
|
||||||
background: "linear-gradient(180deg, #F0ECF4 0%, #E1E0FF 43.5%)",
|
background: "linear-gradient(180deg, #F0ECF4 0%, #E1E0FF 43.5%)",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<AnimatePresence>
|
<AnimatePresence>
|
||||||
<div className="flex items-center justify-center w-full sm:min-h-[240px] pt-6">
|
<div className="flex items-center justify-center w-full pt-6">
|
||||||
{winnerSelectingStatus === "not-selected" ? (
|
{winnerSelectingStatus === "not-selected" ? (
|
||||||
<AnimatedText
|
<AnimatedText
|
||||||
key={topText}
|
key={topText}
|
||||||
|
|
@ -186,7 +186,7 @@ const LotteryWinnersSection = ({ data }: { data: any }) => {
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="flex gap-6 rounded-[12px] flex-1 w-full items-center justify-center sm:pb-[62px] pb-[32px] px-4">
|
<div className="flex gap-6 rounded-[12px] flex-1 w-full items-center justify-center pb-[32px] px-4">
|
||||||
{winners.length > 0 && <LotteryWinnersList winners={winners} />}
|
{winners.length > 0 && <LotteryWinnersList winners={winners} />}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
"use client";
|
"use client";
|
||||||
import { useWebsocketLottery } from "@/hooks/useWebSocketLottery";
|
import { useWebsocketLottery } from "@/hooks/useWebSocketLottery";
|
||||||
|
import clsx from "clsx";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
|
|
@ -57,46 +58,54 @@ const LotteryRulesSection = ({ show = true, data }: IProps) => {
|
||||||
<section>
|
<section>
|
||||||
<div className="container">
|
<div className="container">
|
||||||
<div className="flex flex-col md:gap-8 gap-6">
|
<div className="flex flex-col md:gap-8 gap-6">
|
||||||
<h2 className="md:font-heading-1-regular sm:text-[32px] text-[26px] sm:leading-[40px] leading-[34px]">
|
<div
|
||||||
Düzgünleri:
|
className={clsx(
|
||||||
</h2>
|
"grid gap-6",
|
||||||
|
show ? "md:grid-cols-3" : "md:grid-cols-2"
|
||||||
<div className="grid md:grid-cols-2 gap-6">
|
)}
|
||||||
<div className="flex flex-col bg-lightSurfaceContainer sm:py-4 md:px-8 sm:px-6 py-3 px-4 rounded-[12px] w-full">
|
>
|
||||||
<ul className="list-disc flex flex-col md:gap-4 gap-2 pl-[16px]">
|
<div className="flex flex-col">
|
||||||
{data?.data.rules?.map((item: any, i: number) => (
|
<h2 className="md:font-heading-1-regular text-[22px] sm:leading-[40px] leading-[34px]">
|
||||||
<li className="font-small-regular" key={i}>
|
Düzgünleri:
|
||||||
{item.title}
|
</h2>
|
||||||
</li>
|
<div className="flex flex-1 flex-col bg-lightSurfaceContainer sm:py-4 md:px-8 sm:px-6 py-3 px-4 rounded-[12px] w-full">
|
||||||
))}
|
<ul className="list-disc flex flex-col md:gap-4 gap-2 pl-[16px]">
|
||||||
</ul>
|
{data?.data.rules?.map((item: any, i: number) => (
|
||||||
|
<li className="font-small-regular" key={i}>
|
||||||
|
{item.title}
|
||||||
|
</li>
|
||||||
|
))}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="bg-lightSurfaceContainer flex items-center gap-4 px-4 py-[12px] rounded-[12px]">
|
<div className="flex flex-col">
|
||||||
<h1 className="md:font-heading-5-regular sm:text-[20px] text-[18px] sm:leading-[24px] leading-[28px]">
|
<h1 className="md:font-heading-1-regular text-[22px] sm:leading-[40px] leading-[34px]">
|
||||||
Gatnaşyjylaryň sany:
|
Gatnaşyjylaryň sany:
|
||||||
</h1>
|
</h1>
|
||||||
<p className="text-[24px]">{totalParticipants}</p>
|
<div className="bg-lightSurfaceContainer flex flex-1 items-center justify-center gap-4 px-4 py-[12px] rounded-[12px]">
|
||||||
|
<p className="text-[24px]">{totalParticipants}</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
{show && (
|
{show && (
|
||||||
<div className="flex flex-col md:gap-4 sm:gap-2 gap-4 bg-lightSurfaceContainer sm:py-4 md:px-8 sm:px-6 py-3 px-4 rounded-[12px] w-full">
|
<div className="flex flex-col">
|
||||||
<h3 className="md:font-heading-5-regular sm:text-[20px] text-[18px] sm:leading-[24px] leading-[28px]">
|
<h3 className="md:font-heading-1-regular text-[22px] sm:leading-[40px] leading-[34px]">
|
||||||
Siziň bijeli sanynyz:
|
Siziň bijeli sanyňyz:
|
||||||
</h3>
|
</h3>
|
||||||
<ul className="flex flex-col items-center md:gap-4 gap-2">
|
<ul className="flex flex-col flex-1 md:gap-4 gap-2 bg-lightSurfaceContainer sm:py-4 md:px-8 sm:px-6 py-3 px-4 rounded-[12px] w-full">
|
||||||
{data?.user_lottery_numbers.map((item: any, i: number) => (
|
{data?.user_lottery_numbers.map((item: any, i: number) => (
|
||||||
<li
|
<li
|
||||||
className="text-[24px] text-[#46464F] md:text-[48px] lg:text-[80px] list-none"
|
className="text-[24px] text-[#46464F] list-none"
|
||||||
key={i}
|
key={i}
|
||||||
>
|
>
|
||||||
{item}
|
{item}
|
||||||
</li>
|
</li>
|
||||||
))}
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
||||||
|
|
@ -22,9 +22,9 @@ const TossPage = async ({
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{tossData?.data ? (
|
{tossData?.data ? (
|
||||||
<div className="flex flex-col md:gap-[128px] gap-[80px] font-roboto md:pt-[64px] sm:pt-[48px] pt-[40px] ms:pb-[128px] pb-[80px] text-lightOnSurface">
|
<div className="flex flex-col font-roboto md:pt-[64px] sm:pt-[48px] pt-[40px] ms:pb-[128px] pb-[80px] text-lightOnSurface">
|
||||||
{tossData && (
|
{tossData && (
|
||||||
<div className="flex flex-col sm:gap-[64px] gap-[40px]">
|
<div className="flex flex-col sm:gap-[64px] gap-[40px] pb-[40px]">
|
||||||
<LotteryHeader
|
<LotteryHeader
|
||||||
title={tossData.data.title}
|
title={tossData.data.title}
|
||||||
description={tossData.data.description}
|
description={tossData.data.description}
|
||||||
|
|
@ -47,7 +47,7 @@ const TossPage = async ({
|
||||||
|
|
||||||
<LotteryRulesSection show={false} data={tossData} />
|
<LotteryRulesSection show={false} data={tossData} />
|
||||||
|
|
||||||
<div className="flex flex-col gap-10">
|
<div className="flex flex-col gap-10 mt-[40px]">
|
||||||
<LotteryWinners data={tossData} lotteryStatus={status} />
|
<LotteryWinners data={tossData} lotteryStatus={status} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue