Skip to content

Commit 842ac8b

Browse files
committed
refactor: remove unnecessary condition
1 parent 34c1672 commit 842ac8b

File tree

1 file changed

+2
-3
lines changed
  • src/components/sections/communities/overview/scoreboard

1 file changed

+2
-3
lines changed

src/components/sections/communities/overview/scoreboard/index.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import ScoreboardCard from "@/components/cards/Scoreboard";
33
import ArrowButton from "@/components/ui/button/Arrow";
44
import { useTranslation } from "next-i18next";
55
import { ReactElement, useState } from "react";
6-
// import Loader from "@/components/ui/button/Loader";
76
import Loader from "@/components/ui/Loader";
87
import EmptyState from "@/components/ui/EmptyState";
98

@@ -17,7 +16,7 @@ import EmptyState from "@/components/ui/EmptyState";
1716

1817
export default function ScoreboardOverview(): ReactElement {
1918
const { t } = useTranslation();
20-
const { list, filterBy, loading } = useSelector((state) => state.scoreboard);
19+
const { list, loading } = useSelector((state) => state.scoreboard);
2120

2221
const [items, setItems] = useState(3);
2322

@@ -31,7 +30,7 @@ export default function ScoreboardOverview(): ReactElement {
3130
<div className="h-full w-full grid">
3231
<Loader className="place-self-center" />
3332
</div>
34-
) : (list && list.length !== 0) || filterBy !== "all" ? (
33+
) : list && list.length !== 0 ? (
3534
<div className="flex flex-col w-full overflow-hidden border border-gray-200 border-solid divide-y divide-gray-200 divide-solid rounded-3xl">
3635
{list.slice(0, items).map((item, i) => (
3736
<ScoreboardCard key={`list-element-${i}`} index={i + 1} value={item} />

0 commit comments

Comments
 (0)