mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
Merge branch 'feat/new-catalogue' into feat/achievements-points
# Conflicts: # yarn.lock
This commit is contained in:
commit
711cbb906c
7 changed files with 38 additions and 53 deletions
|
@ -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]);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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 />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue