Skip to content

Commit

Permalink
Update to react 19 and version update (#199)
Browse files Browse the repository at this point in the history
* Update to react 19 and version update

* Fix the refs
  • Loading branch information
petrvecera authored Dec 29, 2024
1 parent 1bd3bb6 commit 06a4ac7
Show file tree
Hide file tree
Showing 7 changed files with 218 additions and 245 deletions.
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "coh3-stats-desktop-app",
"private": true,
"version": "1.6.0",
"version": "1.6.1",
"type": "module",
"repository": {
"url": "https://github.com/cohstats/coh3-stats-desktop-app"
Expand Down Expand Up @@ -42,9 +42,9 @@
"coh-stats-components": "github:cohstats/coh-stats-components#0.0.7",
"coh3-data-types-library": "github:cohstats/coh3-data-types-library#0.0.2",
"mixpanel-browser": "2.58.0",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-router-dom": "6.28.0",
"react": "19.0.0",
"react-dom": "19.0.0",
"react-router-dom": "6.28.1",
"tauri-plugin-fs-watch-api": "https://github.com/tauri-apps/tauri-plugin-fs-watch",
"tauri-plugin-log-api": "https://github.com/tauri-apps/tauri-plugin-log",
"tauri-plugin-store-api": "https://github.com/tauri-apps/tauri-plugin-store",
Expand All @@ -53,10 +53,10 @@
"devDependencies": {
"@tauri-apps/cli": "1.6.1",
"@types/mixpanel-browser": "2.50.2",
"@types/node": "^20.14.13",
"@types/react": "18.3.18",
"@types/react-dom": "18.3.5",
"@vitejs/plugin-react": "4.3.1",
"@types/node": "20.14.13",
"@types/react": "19.0.2",
"@types/react-dom": "19.0.2",
"@vitejs/plugin-react": "4.3.4",
"@wdio/cli": "^7",
"@wdio/local-runner": "^7",
"@wdio/mocha-framework": "^7",
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "coh3-stats-desktop-app"
version = "1.6.0"
version = "1.6.1"
description = "COH3 Stats Desktop App"
authors = ["coh3stats team"]
license = ""
Expand Down
22 changes: 12 additions & 10 deletions src/components/PlayerCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,18 @@ export const PlayerCard: React.FC<PlayerCardProps> = ({
games |{" "}
</span>
</Tooltip>
Total WR{" "}
<b>
{(
((totalGames?.totalWins || 0) /
((totalGames?.totalWins || 0) + (totalGames?.totalLosses || 0))) *
100
).toFixed(0)}
%
</b>{" "}
in <b>{(totalGames?.totalWins || 0) + (totalGames?.totalLosses || 0)}</b> games
<span style={{ whiteSpace: "nowrap" }}>
Total WR{" "}
<b>
{(
((totalGames?.totalWins || 0) /
((totalGames?.totalWins || 0) + (totalGames?.totalLosses || 0))) *
100
).toFixed(0)}
%
</b>{" "}
in <b>{(totalGames?.totalWins || 0) + (totalGames?.totalLosses || 0)}</b> games
</span>
</Text>
</>
) : (
Expand Down
2 changes: 1 addition & 1 deletion src/game-data-provider/useFullGameData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const useFullGameData = () => {
const { rawGameData } = useRawGameData();
const [logFilePath] = useLogFilePath();
const lastGameUniqueKeyRef = useRef<string>("");
const lastGameStateRef = useRef<GameState>();
const lastGameStateRef = useRef<GameState>(null);
const [gameData, setGameData] = useState<FullGameData>();

const generateUniqueGameKey = useCallback((rawGameData: RawGameData) => {
Expand Down
2 changes: 1 addition & 1 deletion src/game-data-provider/useRawGameData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { useLogFilePath } from "./configValues";
export const useRawGameData = () => {
const [logFilePath] = useLogFilePath();
const [rawGameData, setRawGameData] = useState<RawGameData>();
const intervalRef = useRef<NodeJS.Timeout | undefined>();
const intervalRef = useRef<NodeJS.Timeout | undefined>(undefined);
const getLogFileData = async (path: string) => {
const data = (await invoke("parse_log_file_reverse", {
path,
Expand Down
Loading

0 comments on commit 06a4ac7

Please sign in to comment.