Skip to content

Commit 8010842

Browse files
fix(ui): make cards group to the right (#1633)
When the origin card is not visible, there would be 3 cards to the left and 1 to the right
1 parent 68c20b3 commit 8010842

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dashboard/src/components/Tabs/TabGrid.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ const ResponsiveDetailsGrid = ({
1818
const leftTopCards = topCards.slice(0, midIndex);
1919
const rightTopCards = topCards.slice(midIndex);
2020

21-
const midBodyIndex = Math.ceil(bodyCards.length / 2);
21+
const midBodyIndex = Math.floor(bodyCards.length / 2);
2222
const leftBodyCards = bodyCards.slice(0, midBodyIndex);
2323
const rightBodyCards = bodyCards.slice(midBodyIndex);
2424

2525
return (
2626
<>
27-
<div className="hidden grid-cols-2 gap-4 min-2xl:grid">
27+
<div className="hidden grid-cols-2 gap-4 2xl:grid">
2828
<div>
2929
{leftTopCards}
3030
{leftBodyCards}
@@ -35,7 +35,7 @@ const ResponsiveDetailsGrid = ({
3535
</div>
3636
<div className="col-span-2">{footerCards}</div>
3737
</div>
38-
<div className="min-2xl:hidden">
38+
<div className="2xl:hidden">
3939
{topCards}
4040
<div className="grid grid-cols-1 lg:grid-cols-2 lg:gap-x-8">
4141
<div>{leftBodyCards}</div>

0 commit comments

Comments
 (0)