diff --git a/app/components/ProfileScreen.tsx b/app/components/ProfileScreen.tsx
index 4635002..3b49585 100644
--- a/app/components/ProfileScreen.tsx
+++ b/app/components/ProfileScreen.tsx
@@ -58,8 +58,10 @@ export function ProfileScreen({
const [games, setGames] = useState([]);
const [loading, setLoading] = useState(true);
const [filter, setFilter] = useState<"all" | "solo" | "multi">("all");
+ const [page, setPage] = useState(1);
const [confirmDelete, setConfirmDelete] = useState(false);
const [deleting, setDeleting] = useState(false);
+ const PAGE_SIZE = 10;
async function handleDeleteAccount() {
setDeleting(true);
@@ -77,6 +79,8 @@ export function ProfileScreen({
const filtered =
filter === "all" ? games : games.filter((g) => g.mode === filter);
+ const totalPages = Math.max(1, Math.ceil(filtered.length / PAGE_SIZE));
+ const paginated = filtered.slice((page - 1) * PAGE_SIZE, page * PAGE_SIZE);
const stats = computeStats(filtered);
const allStats = computeStats(games);
@@ -186,7 +190,7 @@ export function ProfileScreen({
@@ -205,7 +209,7 @@ export function ProfileScreen({
Aucune partie enregistrée.
)}
- {filtered.map((g) => (
+ {paginated.map((g) => (
+ {/* Pagination */}
+ {totalPages > 1 && (
+
+
+
+ {page} / {totalPages}
+
+
+
+ )}
+
{/* Mes données */}