Skip to content

Commit

Permalink
Merge pull request #146 from migalabs/fix-tables-design-and-pagination
Browse files Browse the repository at this point in the history
Fix tables design and pagination
  • Loading branch information
IuriPons authored Dec 22, 2023
2 parents 6a55baa + 532f3e2 commit 9677544
Show file tree
Hide file tree
Showing 34 changed files with 2,271 additions and 3,265 deletions.
25 changes: 12 additions & 13 deletions packages/client/components/layouts/Blocks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,11 @@ const Blocks = ({ blocks }: Props) => {
<p className='w-[20%]'>{(element.f_el_transactions ?? 0).toLocaleString()}</p>
</div>
))}

{blocks.length === 0 && (
<div className='flex justify-center p-2'>
<p className='uppercase text-[16px]'>No blocks</p>
</div>
)}
</div>
</div>
);
};

//View blocks table mobile
const getContentBlocksMobile = () => {
return (
Expand Down Expand Up @@ -230,17 +225,21 @@ const Blocks = ({ blocks }: Props) => {
</div>
</div>
))}

{blocks.length === 0 && (
<div className='flex justify-center p-2'>
<p className='uppercase text-[14px]'>No blocks</p>
</div>
)}
</div>
);
};

return <div>{desktopView ? getContentBlocksDesktop() : getContentBlocksMobile()}</div>;
return (
<div className='mx-auto w-11/12 md:w-10/12'>
{blocks.length > 0 ? (
<>{desktopView ? getContentBlocksDesktop() : getContentBlocksMobile()}</>
) : (
<div className='flex justify-center p-2'>
<p className='uppercase text-[14px] md:text-[16px]'>No blocks</p>
</div>
)}
</div>
);
};

export default Blocks;
2 changes: 0 additions & 2 deletions packages/client/components/layouts/EpochOverview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ const EpochOverview = ({ epoch, blocks, lastEpoch, showClient }: Props) => {

<TooltipResponsive
width={225}
colorLetter='black'
backgroundColor='white'
content={
<div className='flex flex-col gap-y-1 items-center'>
<span>
Expand Down
Loading

0 comments on commit 9677544

Please sign in to comment.