mirror of
https://github.com/lexogrine/cs2-react-hud.git
synced 2026-05-03 19:53:11 +02:00
Updated setup to vite and moved to hooks instead of class
This commit is contained in:
@@ -1,13 +1,11 @@
|
||||
import React from 'react';
|
||||
import Weapon from './../Weapon/Weapon';
|
||||
import flash_assist from './../../assets/flash_assist.png';
|
||||
|
||||
|
||||
import { C4, Defuse, FlashedKill, Headshot, NoScope, SmokeKill, Suicide, Wallbang } from "./../../assets/Icons"
|
||||
import { ExtendedKillEvent, BombEvent } from "./Killfeed"
|
||||
export default class Kill extends React.Component<{ event: ExtendedKillEvent | BombEvent }> {
|
||||
render() {
|
||||
const { event } = this.props;
|
||||
|
||||
|
||||
const Kill = ({event}: { event: ExtendedKillEvent | BombEvent }) => {
|
||||
if (event.type !== "kill") {
|
||||
return (
|
||||
<div className={`single_kill`}>
|
||||
@@ -50,6 +48,6 @@ export default class Kill extends React.Component<{ event: ExtendedKillEvent | B
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
export default Kill;
|
||||
Reference in New Issue
Block a user