fix quiz[id] page error
This commit is contained in:
parent
a8c5dc79f0
commit
cb7cbb7ac9
|
|
@ -81,30 +81,30 @@ const QuizWinnerTable = ({ quizId, questionsData }: IProps) => {
|
|||
<div className="table-desktop hidden sm:flex flex-col bg-fillTableHead rounded-[25px] shadow-quizButton overflow-hidden max-w-[1000px] w-full">
|
||||
{/* Table Head */}
|
||||
<div className="flex border-b border-fillTableStrokeTableHead">
|
||||
{winnersData[0].client_id || quizSearchData?.data ? (
|
||||
{winnersData[0]?.client_id || quizSearchData?.data ? (
|
||||
<div className="text-center flex justify-center items-center text-base text-textBlack leading-[125%] font-semibold max-w-[54px] w-[100%] pl-6 pr-3 py-5">
|
||||
<span>Ýeri</span>
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
{winnersData[0].phone || quizSearchData?.data ? (
|
||||
{winnersData[0]?.phone || quizSearchData?.data ? (
|
||||
<div className="text-center flex justify-center items-center text-base text-textBlack leading-[125%] font-semibold max-w-[176px] w-[100%] px-3 py-5">
|
||||
<span>Telefon beligisi</span>
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
{winnersData[0].answers.length || quizSearchData?.data ? (
|
||||
{winnersData[0]?.answers.length || quizSearchData?.data ? (
|
||||
<div className="text-center flex justify-center items-center text-base text-textBlack leading-[125%] font-semibold w-[100%] px-3 py-5">
|
||||
<span>Jogap beriş nobatlary</span>
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
{winnersData[0].total_score_of_client || quizSearchData?.data ? (
|
||||
{winnersData[0]?.total_score_of_client || quizSearchData?.data ? (
|
||||
<div className="text-center flex justify-center items-center text-base text-textBlack leading-[125%] font-semibold max-w-[180px] w-[100%] px-3 py-5">
|
||||
<span>Nobatlaryň jemi</span>
|
||||
</div>
|
||||
) : null}
|
||||
{winnersData[0].total_score_of_client || quizSearchData?.data ? (
|
||||
{winnersData[0]?.total_score_of_client || quizSearchData?.data ? (
|
||||
<div className="text-center flex justify-center items-center text-base text-textBlack leading-[125%] font-semibold max-w-[180px] w-[100%] px-3 py-5">
|
||||
<span>Utuklaryň jemi</span>
|
||||
</div>
|
||||
|
|
@ -113,7 +113,7 @@ const QuizWinnerTable = ({ quizId, questionsData }: IProps) => {
|
|||
|
||||
{/* Table Body */}
|
||||
<div className="">
|
||||
{winnersData
|
||||
{winnersData.length > 0
|
||||
? winnersData.map((winner, id) => (
|
||||
<div
|
||||
className={`flex border-b border-fillTableStrokeTableRow ${
|
||||
|
|
@ -262,24 +262,24 @@ const QuizWinnerTable = ({ quizId, questionsData }: IProps) => {
|
|||
<div className="sm:hidden flex flex-col bg-fillTableHead rounded-[13px] shadow-quizButton overflow-hidden max-w-[1000px] w-full">
|
||||
{/* Table Head */}
|
||||
<div className="flex border-b border-fillTableStrokeTableHead p-2 gap-[8px]">
|
||||
{winnersData[0].client_id || quizSearchData?.data ? (
|
||||
{winnersData[0]?.client_id || quizSearchData?.data ? (
|
||||
<div className="text-center flex items-center text-xs text-textBlack leading-[125%] font-semibold max-w-[14px] w-[100%]">
|
||||
<span>Ýeri</span>
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
{winnersData[0].phone || quizSearchData?.data ? (
|
||||
{winnersData[0]?.phone || quizSearchData?.data ? (
|
||||
<div className="text-center flex justify-center items-center text-xs text-textBlack leading-[125%] font-semibold max-w-[107px] w-[100%]">
|
||||
<span>Telefon beligisi</span>
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
{winnersData[0].total_score_of_client || quizSearchData?.data ? (
|
||||
{winnersData[0]?.total_score_of_client || quizSearchData?.data ? (
|
||||
<div className="text-center flex justify-center items-center text-xs text-textBlack leading-[125%] font-semibold max-w-[75px] w-[100%]">
|
||||
<span>Nobatlaryň jemi </span>
|
||||
</div>
|
||||
) : null}
|
||||
{winnersData[0].total_score_of_client || quizSearchData?.data ? (
|
||||
{winnersData[0]?.total_score_of_client || quizSearchData?.data ? (
|
||||
<div className="text-center flex justify-center items-center text-xs text-textBlack leading-[125%] font-semibold max-w-[99px] w-[100%]">
|
||||
<span>Utuklaryň jemi</span>
|
||||
</div>
|
||||
|
|
@ -453,7 +453,7 @@ const QuizWinnerTable = ({ quizId, questionsData }: IProps) => {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{winnersData.length < winnersTotal && (
|
||||
{winnersData.length < winnersTotal && !quizSearchData && (
|
||||
<button
|
||||
onClick={() => getData(true)}
|
||||
className="py-[5px] px-[10px] rounded-md bg-blue-500 text-white border border-blue-500 lg:hover:bg-white lg:hover:text-blue-500 transition-all duration-300"
|
||||
|
|
|
|||
Loading…
Reference in New Issue