From de9aabda4880288b4a2425bfb362b87c7be93151 Mon Sep 17 00:00:00 2001 From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> Date: Sat, 19 Oct 2024 20:14:02 +0300 Subject: frontend: mix user page links, delete icon --- frontend/src/pages/Profile.tsx | 31 ++++++++++++++++++++++++------- frontend/src/pages/User.tsx | 26 +++++++++++++++++++++----- 2 files changed, 45 insertions(+), 12 deletions(-) (limited to 'frontend/src/pages') diff --git a/frontend/src/pages/Profile.tsx b/frontend/src/pages/Profile.tsx index 5e39308..6bd4cf4 100644 --- a/frontend/src/pages/Profile.tsx +++ b/frontend/src/pages/Profile.tsx @@ -14,7 +14,7 @@ interface ProfileProps { profile?: UserProfile; token?: string; gameData: Game[]; - onDeleteRecord: () => void; + onDeleteRecord: () => void; } const Profile: React.FC = ({ profile, token, gameData, onDeleteRecord }) => { @@ -191,7 +191,7 @@ const Profile: React.FC = ({ profile, token, gameData, onDeleteRec @@ -207,10 +207,26 @@ const Profile: React.FC = ({ profile, token, gameData, onDeleteRec Date
- {pageNumber}/{pageMax} -
@@ -240,7 +256,7 @@ const Profile: React.FC = ({ profile, token, gameData, onDeleteRec {e.date.split("T")[0]} - + {i === 0 && r.scores.length > 1 ? + {i === 0 && record!.scores.length > 1 ? {pageNumber}/{pageMax} - @@ -246,7 +262,7 @@ const User: React.FC = ({ token, profile, gameData }) => { let record = user.records.find((e) => e.map_id === r.id); return record === undefined ? (