diff --git a/src/handbook/src/backend/data.ts b/src/handbook/src/backend/data.ts
index 90d3a8bfb..2589e5d3b 100644
--- a/src/handbook/src/backend/data.ts
+++ b/src/handbook/src/backend/data.ts
@@ -26,9 +26,9 @@ export function listCommands(): Command[] {
* Fetches and casts all avatars in the file.
*/
export function getAvatars(): AvatarDump {
- const map: AvatarDump = {}; avatars.forEach(avatar => {
- const values = Object.values(avatar) as
- [string, string, string];
+ const map: AvatarDump = {};
+ avatars.forEach((avatar) => {
+ const values = Object.values(avatar) as [string, string, string];
const id = parseInt(values[0]);
map[id] = {
id,
@@ -51,15 +51,14 @@ export function listAvatars(): Avatar[] {
* Fetches and casts all items in the file.
*/
export function getItems(): Item[] {
- return items.map(item => {
- const values = Object.values(item) as
- [string, string, string, string];
+ return items.map((item) => {
+ const values = Object.values(item) as [string, string, string, string];
const id = parseInt(values[0]);
return {
id,
name: values[1],
type: values[2] as ItemType,
quality: values[3] as Quality
- }
+ };
});
}
diff --git a/src/handbook/src/backend/types.ts b/src/handbook/src/backend/types.ts
index c1fbeeff2..d66f9f53a 100644
--- a/src/handbook/src/backend/types.ts
+++ b/src/handbook/src/backend/types.ts
@@ -19,7 +19,7 @@ export type Item = {
name: string;
quality: Quality;
type: ItemType;
-}
+};
export enum Target {
None = "NONE",
diff --git a/src/handbook/src/main.tsx b/src/handbook/src/main.tsx
index 980517cd2..16159207d 100644
--- a/src/handbook/src/main.tsx
+++ b/src/handbook/src/main.tsx
@@ -9,9 +9,8 @@ import App from "@components/App";
events.setup();
// Render the application.
-createRoot(document.getElementById(
- "root") as HTMLElement).render(
-
-
-
+createRoot(document.getElementById("root") as HTMLElement).render(
+
+
+
);
diff --git a/src/handbook/src/ui/pages/AvatarsPage.tsx b/src/handbook/src/ui/pages/AvatarsPage.tsx
index 19445f951..a5e93b988 100644
--- a/src/handbook/src/ui/pages/AvatarsPage.tsx
+++ b/src/handbook/src/ui/pages/AvatarsPage.tsx
@@ -13,12 +13,9 @@ class AvatarsPage extends React.PureComponent {
Characters
- {
- listAvatars().map(avatar => (
- avatar.id > 11000000 ? undefined :
-
- ))
- }
+ {listAvatars().map((avatar) =>
+ avatar.id > 11000000 ? undefined :
+ )}
);
diff --git a/src/handbook/src/ui/pages/CommandsPage.tsx b/src/handbook/src/ui/pages/CommandsPage.tsx
index 7901cd1dc..165955be7 100644
--- a/src/handbook/src/ui/pages/CommandsPage.tsx
+++ b/src/handbook/src/ui/pages/CommandsPage.tsx
@@ -13,18 +13,17 @@ class CommandsPage extends React.PureComponent {
Commands
- {
- listCommands().map(command => (
-
- ))
- }
+ {listCommands().map((command) => (
+
+ ))}
);
diff --git a/src/handbook/src/ui/pages/ItemsPage.tsx b/src/handbook/src/ui/pages/ItemsPage.tsx
index 44bee062c..6994100dc 100644
--- a/src/handbook/src/ui/pages/ItemsPage.tsx
+++ b/src/handbook/src/ui/pages/ItemsPage.tsx
@@ -11,11 +11,9 @@ class ItemsPage extends React.PureComponent {
Items
- {
- getItems().map(item => (
-
{item.name}
- ))
- }
+ {getItems().map((item) => (
+
{item.name}
+ ))}
);
diff --git a/src/handbook/src/ui/views/Content.tsx b/src/handbook/src/ui/views/Content.tsx
index 80efba867..4d0f8b687 100644
--- a/src/handbook/src/ui/views/Content.tsx
+++ b/src/handbook/src/ui/views/Content.tsx
@@ -47,11 +47,16 @@ class Content extends React.Component {
render() {
switch (this.state.current) {
- default: return undefined;
- case "Home": return ;
- case "Commands": return ;
- case "Avatars": return ;
- case "Items": return ;
+ default:
+ return undefined;
+ case "Home":
+ return ;
+ case "Commands":
+ return ;
+ case "Avatars":
+ return ;
+ case "Items":
+ return ;
}
}
}
diff --git a/src/handbook/src/ui/views/SideBar.tsx b/src/handbook/src/ui/views/SideBar.tsx
index 8b8c95d2a..274d616b2 100644
--- a/src/handbook/src/ui/views/SideBar.tsx
+++ b/src/handbook/src/ui/views/SideBar.tsx
@@ -14,10 +14,7 @@ class SideBar extends React.Component {
render() {
return (
-
navigate("Home")}
- >
+ navigate("Home")}>
The Ultimate Anime Game Handbook
diff --git a/src/handbook/src/ui/widgets/Card.tsx b/src/handbook/src/ui/widgets/Card.tsx
index a68ae151b..a6841bac0 100644
--- a/src/handbook/src/ui/widgets/Card.tsx
+++ b/src/handbook/src/ui/widgets/Card.tsx
@@ -30,19 +30,21 @@ class Card extends React.PureComponent {
>
{this.props.title}
- {this.props.alternate &&
-
{this.props.alternate}
}
+ {this.props.alternate &&
{this.props.alternate}
}
- {
- this.props.description ? (
- Array.isArray(this.props.description) ?
- this.props.description.map((line, index) => (
-
{line}
- )) :
{this.props.description}
- ) : undefined
- }
+ {this.props.description ? (
+ Array.isArray(this.props.description) ? (
+ this.props.description.map((line, index) => (
+
+ {line}
+
+ ))
+ ) : (
+
{this.props.description}
+ )
+ ) : undefined}
);
diff --git a/src/handbook/src/ui/widgets/Character.tsx b/src/handbook/src/ui/widgets/Character.tsx
index 92dc7500d..6682e0530 100644
--- a/src/handbook/src/ui/widgets/Character.tsx
+++ b/src/handbook/src/ui/widgets/Character.tsx
@@ -26,12 +26,12 @@ const ignored = [
const refSwitch: { [key: number]: string } = {
10000005: "traveler_anemo",
- 10000007: "traveler_geo",
+ 10000007: "traveler_geo"
};
const nameSwitch: { [key: number]: string } = {
10000005: "Lumine",
- 10000007: "Aether",
+ 10000007: "Aether"
};
interface IProps {
@@ -48,14 +48,10 @@ class Character extends React.PureComponent {
const qualityColor = colorFor(quality);
// Check if the avatar is blacklisted.
- if (ignored.includes(id))
- return undefined;
+ if (ignored.includes(id)) return undefined;
return (
-
+
{
render() {
return (
-
this.redirect()}
- >
-
+
this.redirect()}>
+
{this.props.name}
diff --git a/src/handbook/src/ui/widgets/SideBarButton.tsx b/src/handbook/src/ui/widgets/SideBarButton.tsx
index e6e518586..5a16af4c5 100644
--- a/src/handbook/src/ui/widgets/SideBarButton.tsx
+++ b/src/handbook/src/ui/widgets/SideBarButton.tsx
@@ -25,15 +25,8 @@ class SideBarButton extends React.PureComponent
{
render() {
return (
- this.redirect()}
- >
-
+
this.redirect()}>
+
{this.props.name}
diff --git a/src/handbook/src/utils.ts b/src/handbook/src/utils.ts
index 821538017..089e2edf2 100644
--- a/src/handbook/src/utils.ts
+++ b/src/handbook/src/utils.ts
@@ -7,11 +7,17 @@ import { Quality } from "@backend/types";
*/
export function colorFor(quality: Quality): string {
switch (quality) {
- default: return "--legendary-color";
- case "EPIC": return "--epic-color";
- case "RARE": return "--rare-color";
- case "UNCOMMON": return "--uncommon-color";
- case "COMMON": return "--common-color";
- case "UNKNOWN": return "--unknown-color";
+ default:
+ return "--legendary-color";
+ case "EPIC":
+ return "--epic-color";
+ case "RARE":
+ return "--rare-color";
+ case "UNCOMMON":
+ return "--uncommon-color";
+ case "COMMON":
+ return "--common-color";
+ case "UNKNOWN":
+ return "--unknown-color";
}
}