mirror of
https://github.com/lexogrine/cs2-react-hud.git
synced 2025-12-10 02:42:49 +01:00
updated csgogsi
This commit is contained in:
parent
6708bcf48c
commit
4dec09c043
12
package-lock.json
generated
12
package-lock.json
generated
@ -1,15 +1,15 @@
|
|||||||
{
|
{
|
||||||
"name": "cs2-react-hud",
|
"name": "cs2-react-hud",
|
||||||
"version": "1.0.3",
|
"version": "1.0.4",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "cs2-react-hud",
|
"name": "cs2-react-hud",
|
||||||
"version": "1.0.3",
|
"version": "1.0.4",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"csgogsi": "^3.0.3",
|
"csgogsi": "^3.0.5",
|
||||||
"jsonwebtoken": "^9.0.2",
|
"jsonwebtoken": "^9.0.2",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
@ -2201,9 +2201,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/csgogsi": {
|
"node_modules/csgogsi": {
|
||||||
"version": "3.0.3",
|
"version": "3.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/csgogsi/-/csgogsi-3.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/csgogsi/-/csgogsi-3.0.5.tgz",
|
||||||
"integrity": "sha512-5pV5lQFd+rREtKnU8LUy7yR1kW4Yxtfej9RSoMkaq+uRI/TSDhIQ495sHcjVL43vxbB4ggyahYVJnSlTroWecQ=="
|
"integrity": "sha512-hGw3KnAu90xKL2MJA1OqcawtUuUJL7Irvq4pYLCam8iAbWEKwMaDRDopY3NOae9pQemnbhBUaLh6R6qlGR7InA=="
|
||||||
},
|
},
|
||||||
"node_modules/csstype": {
|
"node_modules/csstype": {
|
||||||
"version": "3.1.2",
|
"version": "3.1.2",
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
"sign": "npm run build && node sign.js && npm-build-zip --name=signed"
|
"sign": "npm run build && node sign.js && npm-build-zip --name=signed"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"csgogsi": "^3.0.3",
|
"csgogsi": "^3.0.5",
|
||||||
"jsonwebtoken": "^9.0.2",
|
"jsonwebtoken": "^9.0.2",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
|
|||||||
@ -22,7 +22,7 @@ function stringToClock(time: string | number, pad = true) {
|
|||||||
interface IProps {
|
interface IProps {
|
||||||
match: Match | null;
|
match: Match | null;
|
||||||
map: I.Map;
|
map: I.Map;
|
||||||
phase: I.PhaseRaw,
|
phase: I.CSGO["phase_countdowns"],
|
||||||
bomb: I.Bomb | null,
|
bomb: I.Bomb | null,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { PhaseRaw } from "csgogsi";
|
import { CSGO } from "csgogsi";
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
phase: PhaseRaw | null;
|
phase: CSGO["phase_countdowns"] | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Pause = ({ phase }: IProps) => {
|
const Pause = ({ phase }: IProps) => {
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
import { Map, PhaseRaw } from "csgogsi";
|
import { Map, CSGO } from "csgogsi";
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
phase: PhaseRaw | null;
|
phase: CSGO["phase_countdowns"] | null;
|
||||||
map: Map;
|
map: Map;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Timeout = ({ phase, map }: IProps) => {
|
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;
|
const team = phase && phase.phase === "timeout_t" ? map.team_t : map.team_ct;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@ -31,7 +31,7 @@ export const useBombTimer = () => {
|
|||||||
const state = bomb?.state || null;
|
const state = bomb?.state || null;
|
||||||
const site = bomb?.site || null;
|
const site = bomb?.site || null;
|
||||||
|
|
||||||
const countdown = parseFloat(bomb?.countdown || '0');
|
const countdown = bomb?.countdown || 0;
|
||||||
|
|
||||||
setPlayerSteamId(bombPlayer);
|
setPlayerSteamId(bombPlayer);
|
||||||
setBombState(state);
|
setBombState(state);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user