diff --git a/app/webapp/app/Controllers/Http/PlayerController.js b/app/webapp/app/Controllers/Http/PlayerController.js index a859c95..ef051dd 100644 --- a/app/webapp/app/Controllers/Http/PlayerController.js +++ b/app/webapp/app/Controllers/Http/PlayerController.js @@ -36,6 +36,7 @@ class PlayerController { const playerStatData = await Database.from('games') .select('game_id', + 'gametype', 'stats') .where({ player_guid: request.params.player_guid }) diff --git a/app/webapp/resources/js/Components/GameTypesPlayedBoxes/GameTypesPlayedBoxes.js b/app/webapp/resources/js/Components/GameTypesPlayedBoxes/GameTypesPlayedBoxes.js index cf05f5a..df3a400 100644 --- a/app/webapp/resources/js/Components/GameTypesPlayedBoxes/GameTypesPlayedBoxes.js +++ b/app/webapp/resources/js/Components/GameTypesPlayedBoxes/GameTypesPlayedBoxes.js @@ -10,7 +10,7 @@ const returnTotalSumGames = (player) => { const GameTypesPlayedBoxes = (props) => { return ( -
+ <>

Games Played {returnTotalSumGames(props)}

@@ -64,7 +64,7 @@ const GameTypesPlayedBoxes = (props) => {
- + ); }; diff --git a/app/webapp/resources/js/Components/GameTypesPlayedCols/GameTypesPlayedCols.js b/app/webapp/resources/js/Components/GameTypesPlayedCols/GameTypesPlayedCols.js new file mode 100644 index 0000000..af0e8b5 --- /dev/null +++ b/app/webapp/resources/js/Components/GameTypesPlayedCols/GameTypesPlayedCols.js @@ -0,0 +1,58 @@ +import React from 'react' + +const returnTotalSumGames = (player) => { + let sum = Number(player.ctf) + + Number(player.dm) + + Number(player.lak) + + Number(player.spawnctf); + return sum +}; + +const GameTypesPlayedCols = (props) => { + return ( + <> +
+
+
+ CTF +
+
+ {props.ctf} +
+
+
+ LAK Rabbit +
+
+ {props.lak} +
+
+
+ Spawn CTF +
+
+ {props.spawnctf} +
+
+
+ Deathmatch +
+
+ {props.dm} +
+
+
+
+
+ Total +
+
+ {returnTotalSumGames(props)} +
+
+ + + ); +}; + +export default GameTypesPlayedCols; diff --git a/app/webapp/resources/js/Components/GameTypesPlayedCols/index.js b/app/webapp/resources/js/Components/GameTypesPlayedCols/index.js new file mode 100644 index 0000000..d8646f9 --- /dev/null +++ b/app/webapp/resources/js/Components/GameTypesPlayedCols/index.js @@ -0,0 +1 @@ +export { default } from './GameTypesPlayedCols'; diff --git a/app/webapp/resources/js/Components/TopNav/TopNav.js b/app/webapp/resources/js/Components/TopNav/TopNav.js index 7c717c0..b8f320d 100644 --- a/app/webapp/resources/js/Components/TopNav/TopNav.js +++ b/app/webapp/resources/js/Components/TopNav/TopNav.js @@ -4,49 +4,33 @@ import { InertiaLink } from '@inertiajs/inertia-react' const navItems = () =>
- Home + {/* Home */} Games Players
; const TopNav = () => { return ( -