Skip to content

Commit

Permalink
Fix map stats page (#223)
Browse files Browse the repository at this point in the history
* Fix map stats object

* Comment out the value
  • Loading branch information
petrvecera authored Jun 6, 2022
1 parent 2c6eac4 commit fb6f6ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 0 additions & 2 deletions packages/web/src/components/patch-notifications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ const PatchNotification: React.FC<IProps> = ({ params }) => {
);
}

console.log(patchesJSX);

return <div style={{ textAlign: "center" }}>{patchesJSX}</div>;
};

Expand Down
7 changes: 6 additions & 1 deletion packages/web/src/pages/map-stats/map-stats-details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,12 @@ const MapStatsDetails: React.FC<IProps> = ({ urlChanger, specificData }) => {
const frequency = query.get("range") || "";
let map = query.get("map") || "8p_redball_express";

const data = specificData;
// const totalGames = specificData.totalGames || null;
// We added total games to the object with the maps / we need to remove it
// We need to do a copy of the object because we can't remove the key otherwise
const data: Record<string, any> = JSON.parse(JSON.stringify(specificData));
delete data["totalGames"];

let amountOfGames = 0;

const mapData: Record<string, number> = {};
Expand Down

0 comments on commit fb6f6ac

Please sign in to comment.