Merge branch 'feat/new-catalogue' into feat/achievements-points

# Conflicts:
#	yarn.lock
This commit is contained in:
Zamitto 2024-12-23 16:53:28 -03:00
commit 711cbb906c
7 changed files with 38 additions and 53 deletions

View file

@ -114,7 +114,7 @@ export default function Catalogue() {
.sort(([keyA], [keyB]) => keyA.localeCompare(keyB))
.map(([key, value]) => ({
label: key,
value: value.toString(),
value: value,
checked: filters.tags.includes(value),
}));
}, [steamUserTags, filters.tags, language]);

View file

@ -8,10 +8,10 @@ export interface FilterSectionProps {
title: string;
items: {
label: string;
value: string;
value: string | number;
checked: boolean;
}[];
onSelect: (value: string) => void;
onSelect: (value: string | number) => void;
color: string;
onClear: () => void;
}

View file

@ -38,22 +38,24 @@ export function Pagination({
<Button
theme="outline"
onClick={() => onPageChange(page - 1)}
style={{ width: 40 }}
style={{ width: 40, maxWidth: 40, maxHeight: 40 }}
disabled={page === 1}
>
<ChevronLeftIcon />
</Button>
<div
style={{
width: 40,
justifyContent: "center",
display: "flex",
alignItems: "center",
}}
>
<span style={{ fontSize: 16 }}>...</span>
</div>
{page > 2 && (
<div
style={{
width: 40,
justifyContent: "center",
display: "flex",
alignItems: "center",
}}
>
<span style={{ fontSize: 16 }}>...</span>
</div>
)}
{/* Page Buttons */}
{Array.from(
@ -63,17 +65,31 @@ export function Pagination({
<Button
theme={page === pageNumber ? "primary" : "outline"}
key={pageNumber}
style={{ width: 40, maxWidth: 40, maxHeight: 40 }}
onClick={() => onPageChange(pageNumber)}
>
{pageNumber}
</Button>
))}
{page < totalPages - 1 && (
<div
style={{
width: 40,
justifyContent: "center",
display: "flex",
alignItems: "center",
}}
>
<span style={{ fontSize: 16 }}>...</span>
</div>
)}
{/* Next Button */}
<Button
theme="outline"
onClick={() => onPageChange(page + 1)}
style={{ width: 40 }}
style={{ width: 40, maxWidth: 40, maxHeight: 40 }}
disabled={page === totalPages}
>
<ChevronRightIcon />