diff --git a/src/handbook/src/backend/commands.ts b/src/handbook/src/backend/commands.ts index e7571d33c..6389ba62b 100644 --- a/src/handbook/src/backend/commands.ts +++ b/src/handbook/src/backend/commands.ts @@ -12,8 +12,7 @@ function invalid(value: number): boolean { */ function basicGive(item: number, amount = 1): string { // Validate the numbers. - if (invalid(item) || invalid(amount)) - return "Invalid arguments."; + if (invalid(item) || invalid(amount)) return "Invalid arguments."; return `/give ${item} x${amount}`; } diff --git a/src/handbook/src/ui/components/TextState.tsx b/src/handbook/src/ui/components/TextState.tsx index 7ab52fcef..b0d50af42 100644 --- a/src/handbook/src/ui/components/TextState.tsx +++ b/src/handbook/src/ui/components/TextState.tsx @@ -38,9 +38,7 @@ class TextState extends React.Component { } render() { - return this.state.state ? - this.props.text2 : - this.props.text1; + return this.state.state ? this.props.text2 : this.props.text1; } } diff --git a/src/handbook/src/ui/widgets/ItemCard.tsx b/src/handbook/src/ui/widgets/ItemCard.tsx index ff47ec9f2..40159afd6 100644 --- a/src/handbook/src/ui/widgets/ItemCard.tsx +++ b/src/handbook/src/ui/widgets/ItemCard.tsx @@ -86,15 +86,12 @@ class ItemCard extends React.Component { */ private async addToInventory(): Promise { const item = this.props.item?.id ?? 102; - const amount = typeof this.state.count == "string" ? - parseInt(this.state.count) : - this.state.count; + const amount = typeof this.state.count == "string" ? parseInt(this.state.count) : this.state.count; if (connected) { await giveItem(item, amount); } else { - await copyToClipboard( - give.basic(item, amount)); + await copyToClipboard(give.basic(item, amount)); } } @@ -165,14 +162,8 @@ class ItemCard extends React.Component { -