mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-18 15:28:43 +02:00
removing some of the classes
This commit is contained in:
33
src/BitNode/ui/BitFlumeModal.tsx
Normal file
33
src/BitNode/ui/BitFlumeModal.tsx
Normal file
@@ -0,0 +1,33 @@
|
||||
import React, { useState, useEffect } from "react";
|
||||
import { Modal } from "../../ui/React/Modal";
|
||||
import { use } from "../../ui/Context";
|
||||
import { EventEmitter } from "../../utils/EventEmitter";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import Button from "@mui/material/Button";
|
||||
|
||||
export const BitFlumeEvent = new EventEmitter<[]>();
|
||||
|
||||
export function BitFlumeModal(): React.ReactElement {
|
||||
const router = use.Router();
|
||||
const [open, setOpen] = useState(false);
|
||||
function flume(): void {
|
||||
router.toBitVerse(true, false);
|
||||
setOpen(false);
|
||||
}
|
||||
|
||||
useEffect(() => BitFlumeEvent.subscribe(() => setOpen(true)), []);
|
||||
|
||||
return (
|
||||
<Modal open={open} onClose={() => setOpen(false)}>
|
||||
<Typography>
|
||||
WARNING: USING THIS PROGRAM WILL CAUSE YOU TO LOSE ALL OF YOUR PROGRESS ON THE CURRENT BITNODE.
|
||||
<br />
|
||||
<br />
|
||||
Do you want to travel to the BitNode Nexus? This allows you to reset the current BitNode and select a new one.
|
||||
</Typography>
|
||||
<br />
|
||||
<br />
|
||||
<Button onClick={flume}>Travel to the BitVerse</Button>
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user