mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-03 14:27:03 +02:00
learned and implemented default props
This commit is contained in:
@@ -85,7 +85,7 @@ export function CovenantSleeveMemoryUpgrade(props: IProps): React.ReactElement {
|
||||
|
||||
<Box display="flex" flexDirection="row" alignItems="center">
|
||||
<Typography>Amount of memory to purchase (must be an integer): </Typography>
|
||||
<TextField variant="standard" onChange={changePurchaseAmount} type={"number"} value={amt} />
|
||||
<TextField onChange={changePurchaseAmount} type={"number"} value={amt} />
|
||||
</Box>
|
||||
<br />
|
||||
<Button disabled={purchaseBtnDisabled} onClick={purchaseMemory}>
|
||||
|
||||
@@ -70,7 +70,7 @@ export function SleeveAugmentationsModal(props: IProps): React.ReactElement {
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
<Box display="flex">
|
||||
<Tooltip disableInteractive title={aug.stats || ""}>
|
||||
<Tooltip title={aug.stats || ""}>
|
||||
<Typography>{aug.name}</Typography>
|
||||
</Tooltip>
|
||||
</Box>
|
||||
@@ -111,7 +111,7 @@ export function SleeveAugmentationsModal(props: IProps): React.ReactElement {
|
||||
}
|
||||
|
||||
return (
|
||||
<Tooltip key={augName} disableInteractive title={<Typography>{tooltip}</Typography>}>
|
||||
<Tooltip key={augName} title={<Typography>{tooltip}</Typography>}>
|
||||
<Paper>
|
||||
<Typography>{augName}</Typography>
|
||||
</Paper>
|
||||
|
||||
@@ -171,10 +171,7 @@ export function SleeveElem(props: IProps): React.ReactElement {
|
||||
<Grid item xs={3}>
|
||||
<StatsElement sleeve={props.sleeve} />
|
||||
<Button onClick={() => setStatsOpen(true)}>More Stats</Button>
|
||||
<Tooltip
|
||||
disableInteractive
|
||||
title={player.money.lt(CONSTANTS.TravelCost) ? <Typography>Insufficient funds</Typography> : ""}
|
||||
>
|
||||
<Tooltip title={player.money.lt(CONSTANTS.TravelCost) ? <Typography>Insufficient funds</Typography> : ""}>
|
||||
<span>
|
||||
<Button onClick={() => setTravelOpen(true)} disabled={player.money.lt(CONSTANTS.TravelCost)}>
|
||||
Travel
|
||||
@@ -182,7 +179,6 @@ export function SleeveElem(props: IProps): React.ReactElement {
|
||||
</span>
|
||||
</Tooltip>
|
||||
<Tooltip
|
||||
disableInteractive
|
||||
title={props.sleeve.shock < 100 ? <Typography>Unlocked when sleeve has fully recovered</Typography> : ""}
|
||||
>
|
||||
<span>
|
||||
|
||||
@@ -275,7 +275,7 @@ export function TaskSelector(props: IProps): React.ReactElement {
|
||||
|
||||
return (
|
||||
<>
|
||||
<Select variant="standard" onChange={onS0Change} value={s0}>
|
||||
<Select onChange={onS0Change} value={s0}>
|
||||
{validActions.map((task) => (
|
||||
<MenuItem key={task} value={task}>
|
||||
{task}
|
||||
@@ -285,7 +285,7 @@ export function TaskSelector(props: IProps): React.ReactElement {
|
||||
{!(details.first.length === 1 && details.first[0] === "------") && (
|
||||
<>
|
||||
<br />
|
||||
<Select variant="standard" onChange={onS1Change} value={s1}>
|
||||
<Select onChange={onS1Change} value={s1}>
|
||||
{details.first.map((detail) => (
|
||||
<MenuItem key={detail} value={detail}>
|
||||
{detail}
|
||||
@@ -297,7 +297,7 @@ export function TaskSelector(props: IProps): React.ReactElement {
|
||||
{!(details2.length === 1 && details2[0] === "------") && (
|
||||
<>
|
||||
<br />
|
||||
<Select variant="standard" onChange={onS2Change} value={s2}>
|
||||
<Select onChange={onS2Change} value={s2}>
|
||||
{details2.map((detail) => (
|
||||
<MenuItem key={detail} value={detail}>
|
||||
{detail}
|
||||
|
||||
Reference in New Issue
Block a user