From a62a768950cc74960af60b554669a67f91344c67 Mon Sep 17 00:00:00 2001 From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> Date: Wed, 30 Oct 2024 11:58:15 +0300 Subject: frontend: revert map index --- frontend/src/components/Summary.tsx | 2 +- frontend/src/pages/Maps.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/Summary.tsx b/frontend/src/components/Summary.tsx index aa351da..23da82c 100644 --- a/frontend/src/components/Summary.tsx +++ b/frontend/src/components/Summary.tsx @@ -57,7 +57,7 @@ const Summary: React.FC = ({ selectedRun, setSelectedRun, data }) React.useEffect(() => { _select_run(0, selectedCategory); - }, [selectedCategory]); + }, []); return ( <> diff --git a/frontend/src/pages/Maps.tsx b/frontend/src/pages/Maps.tsx index bc939cf..9862cbb 100644 --- a/frontend/src/pages/Maps.tsx +++ b/frontend/src/pages/Maps.tsx @@ -83,7 +83,7 @@ const Maps: React.FC = ({ token, isModerator }) => {
- +
{mapSummaryData.map.map_name}
-- cgit v1.2.3 From ec7f00716fac146e4d089a6ab239566c56c8e21f Mon Sep 17 00:00:00 2001 From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> Date: Wed, 30 Oct 2024 12:01:20 +0300 Subject: backend: order map routes --- backend/handlers/map.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/handlers/map.go b/backend/handlers/map.go index 33910fe..b2a0b91 100644 --- a/backend/handlers/map.go +++ b/backend/handlers/map.go @@ -92,7 +92,7 @@ func FetchMapSummary(c *gin.Context) { INNER JOIN categories c ON mh.category_id = c.id LEFT JOIN map_ratings rt ON mh.map_id = rt.map_id AND mh.category_id = rt.category_id WHERE mh.map_id = $1 AND mh.score_count = mh.score_count GROUP BY mh.id, c.id, mh.user_name, mh.score_count, mh.record_date, mh.description, mh.showcase - ORDER BY mh.record_date ASC;` + ORDER BY mh.category_id ASC, mh.score_count ASC;` rows, err := database.DB.Query(sql, id) if err != nil { c.JSON(http.StatusOK, models.ErrorResponse(err.Error())) -- cgit v1.2.3