This commit is contained in:
Olivier Gagnon
2021-09-25 13:31:42 -04:00
parent f7aa393a8f
commit ef17f0d617
9 changed files with 38 additions and 24 deletions
+9 -2
View File
@@ -2,7 +2,7 @@
* Root React component for the Augmentations UI page that display all of your
* owned and purchased Augmentations and Source-Files.
*/
import React, { useState } from "react";
import React, { useState, useEffect } from "react";
import { InstalledAugmentations } from "./InstalledAugmentations";
import { PlayerMultipliers } from "./PlayerMultipliers";
@@ -23,10 +23,17 @@ interface IProps {
export function AugmentationsRoot(props: IProps): React.ReactElement {
const setRerender = useState(false)[1];
function rerender(): void {
setRerender((o) => !o);
}
useEffect(() => {
const id = setInterval(rerender, 200);
return () => clearInterval(id);
}, []);
function doExport(): void {
props.exportGameFn();
setRerender((o) => !o);
rerender();
}
function exportBonusStr(): string {