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