diff --git a/package-lock.json b/package-lock.json index 3b2f521..21fe856 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "cs2-react-hud", - "version": "1.0.3", + "version": "1.0.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "cs2-react-hud", - "version": "1.0.3", + "version": "1.0.4", "license": "MIT", "dependencies": { - "csgogsi": "^3.0.3", + "csgogsi": "^3.0.5", "jsonwebtoken": "^9.0.2", "react": "^18.2.0", "react-dom": "^18.2.0", @@ -2201,9 +2201,9 @@ } }, "node_modules/csgogsi": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/csgogsi/-/csgogsi-3.0.3.tgz", - "integrity": "sha512-5pV5lQFd+rREtKnU8LUy7yR1kW4Yxtfej9RSoMkaq+uRI/TSDhIQ495sHcjVL43vxbB4ggyahYVJnSlTroWecQ==" + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/csgogsi/-/csgogsi-3.0.5.tgz", + "integrity": "sha512-hGw3KnAu90xKL2MJA1OqcawtUuUJL7Irvq4pYLCam8iAbWEKwMaDRDopY3NOae9pQemnbhBUaLh6R6qlGR7InA==" }, "node_modules/csstype": { "version": "3.1.2", diff --git a/package.json b/package.json index 33e48fd..c799028 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "sign": "npm run build && node sign.js && npm-build-zip --name=signed" }, "dependencies": { - "csgogsi": "^3.0.3", + "csgogsi": "^3.0.5", "jsonwebtoken": "^9.0.2", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/src/HUD/MatchBar/MatchBar.tsx b/src/HUD/MatchBar/MatchBar.tsx index b50f3fe..66e06a5 100644 --- a/src/HUD/MatchBar/MatchBar.tsx +++ b/src/HUD/MatchBar/MatchBar.tsx @@ -22,7 +22,7 @@ function stringToClock(time: string | number, pad = true) { interface IProps { match: Match | null; map: I.Map; - phase: I.PhaseRaw, + phase: I.CSGO["phase_countdowns"], bomb: I.Bomb | null, } diff --git a/src/HUD/PauseTimeout/Pause.tsx b/src/HUD/PauseTimeout/Pause.tsx index f3d84d3..65e7cf7 100644 --- a/src/HUD/PauseTimeout/Pause.tsx +++ b/src/HUD/PauseTimeout/Pause.tsx @@ -1,7 +1,7 @@ -import { PhaseRaw } from "csgogsi"; +import { CSGO } from "csgogsi"; interface IProps { - phase: PhaseRaw | null; + phase: CSGO["phase_countdowns"] | null; } const Pause = ({ phase }: IProps) => { diff --git a/src/HUD/PauseTimeout/Timeout.tsx b/src/HUD/PauseTimeout/Timeout.tsx index c310ae4..0d1c586 100644 --- a/src/HUD/PauseTimeout/Timeout.tsx +++ b/src/HUD/PauseTimeout/Timeout.tsx @@ -1,12 +1,12 @@ -import { Map, PhaseRaw } from "csgogsi"; +import { Map, CSGO } from "csgogsi"; interface IProps { - phase: PhaseRaw | null; + phase: CSGO["phase_countdowns"] | null; map: Map; } const Timeout = ({ phase, map }: IProps) => { - const time = phase && Math.abs(Math.ceil(parseFloat(phase.phase_ends_in))); + const time = phase && Math.abs(Math.ceil(phase.phase_ends_in)); const team = phase && phase.phase === "timeout_t" ? map.team_t : map.team_ct; return ( diff --git a/src/HUD/Timers/Countdown.ts b/src/HUD/Timers/Countdown.ts index ffc5003..17f2937 100644 --- a/src/HUD/Timers/Countdown.ts +++ b/src/HUD/Timers/Countdown.ts @@ -31,7 +31,7 @@ export const useBombTimer = () => { const state = bomb?.state || null; const site = bomb?.site || null; - const countdown = parseFloat(bomb?.countdown || '0'); + const countdown = bomb?.countdown || 0; setPlayerSteamId(bombPlayer); setBombState(state);