mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-29 01:17:34 +01:00
commit
701e165920
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -52,6 +52,7 @@ export function DonateOption(props: IProps): React.ReactElement {
|
||||
const amt = numeralWrapper.parseMoney(event.target.value);
|
||||
if (event.target.value === "" || isNaN(amt)) setDonateAmt(null);
|
||||
else setDonateAmt(amt);
|
||||
console.log('set')
|
||||
}
|
||||
|
||||
function donate(): void {
|
||||
|
@ -66,16 +66,10 @@ const GangNames = [
|
||||
];
|
||||
|
||||
export function FactionRoot(props: IProps): React.ReactElement {
|
||||
const setRerender = useState(false)[1];
|
||||
const setRerender = useState(false)[1];
|
||||
function rerender(): void {
|
||||
setRerender((old) => !old);
|
||||
setRerender((old) => !old);
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
const id = setInterval(rerender, 1000);
|
||||
return () => clearInterval(id);
|
||||
}, []);
|
||||
|
||||
const faction = props.faction;
|
||||
|
||||
const player = use.Player();
|
||||
|
@ -2,7 +2,7 @@
|
||||
* React component for general information about the faction. This includes the
|
||||
* factions "motto", reputation, favor, and gameplay instructions
|
||||
*/
|
||||
import * as React from "react";
|
||||
import React, {useState, useEffect} from "react";
|
||||
|
||||
import { Faction } from "../../Faction/Faction";
|
||||
import { FactionInfo } from "../../Faction/FactionInfo";
|
||||
@ -34,6 +34,16 @@ const useStyles = makeStyles((theme: Theme) =>
|
||||
);
|
||||
|
||||
export function Info(props: IProps): React.ReactElement {
|
||||
const setRerender = useState(false)[1];
|
||||
function rerender(): void {
|
||||
setRerender((old) => !old);
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
const id = setInterval(rerender, 1000);
|
||||
return () => clearInterval(id);
|
||||
}, []);
|
||||
|
||||
const classes = useStyles();
|
||||
|
||||
const favorGain = props.faction.getFavorGain()[0];
|
||||
|
Loading…
Reference in New Issue
Block a user