Skip to content

Commit e56a0cd

Browse files
committed
Adjust tabs for both tables
1 parent 09a1560 commit e56a0cd

File tree

2 files changed

+4
-30
lines changed

2 files changed

+4
-30
lines changed

src/components/community-stats/SdvCoreSection.js

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import TableHeaderCell from "../common/table/TableHeaderCell";
55
import TableBody from "../common/table/TableBody";
66
import TableRow from "../common/table/TableRow";
77
import TableRowCell from "../common/table/TableRowCell";
8-
import Tab from "../common/Tab";
98
import useWindowWidth from "../../hooks/useviewport";
109

1110
export default function SdvCoreSection() {
@@ -55,37 +54,12 @@ export default function SdvCoreSection() {
5554
}
5655
};
5756

58-
const [tabs, setTabs] = useState([
59-
{ label: "Downloads", isActive: true },
60-
{ label: "Users", isActive: false },
61-
]);
62-
63-
const clickTab = (label) => {
64-
setTabs((prevTabs) =>
65-
prevTabs.map((tab) => ({
66-
...tab,
67-
isActive: tab.label === label,
68-
}))
69-
);
70-
};
71-
7257
return (
7358
<div className="flex justify-center bg-white">
7459
<div className="container w-full flex flex-col py-12 md:py-16 lg:py-24 px-4 md:px-5 lg:px-0">
7560
<h1 className="heading-600-lg pb-6 text-center md:leading-lg md:pb-12">
7661
SDV Core
7762
</h1>
78-
<div className="flex gap-2.5 lg:gap-9 border-b border-b-midnight-200 mb-6">
79-
{tabs.map((t) => (
80-
<Tab
81-
key={t.label}
82-
isActive={t.isActive}
83-
onClick={() => clickTab(t.label)}
84-
>
85-
{t.label}
86-
</Tab>
87-
))}
88-
</div>
8963
<Table tableColDimensions={tableColDimensions}>
9064
<TableHeader>
9165
<div className="relative">

src/components/community-stats/SdvInNumbersSection.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ export default function SdvInNumbersSection() {
6161
};
6262

6363
const [tabs, setTabs] = useState([
64-
{ label: "Downloads", isActive: true },
65-
{ label: "Users", isActive: false },
66-
{ label: "Visualize", isActive: false },
64+
{ label: "Visualize", isActive: true },
65+
{ label: "Downloads", isActive: false },
66+
// { label: "Users", isActive: false },
6767
]);
6868
const activeTab = tabs.find((t) => t.isActive);
6969

@@ -106,7 +106,7 @@ export default function SdvInNumbersSection() {
106106
))}
107107
</div>
108108
<div className="mb-12 lg:mb-24">
109-
{(activeTab.label === "Downloads" || activeTab.label === "Users") && (
109+
{activeTab.label === "Downloads" && (
110110
<Table tableColDimensions={tableColDimensions}>
111111
<TableHeader>
112112
<div className="relative">

0 commit comments

Comments
 (0)