From 63846089a476ac8eac8467b873403512346714af Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Tue, 4 Jul 2023 12:04:43 -0700 Subject: [PATCH] Preliminary work around making an Element type --- types/GranblueElement.d.ts | 9 ++++++ utils/elements.tsx | 60 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 types/GranblueElement.d.ts create mode 100644 utils/elements.tsx diff --git a/types/GranblueElement.d.ts b/types/GranblueElement.d.ts new file mode 100644 index 00000000..563f38e7 --- /dev/null +++ b/types/GranblueElement.d.ts @@ -0,0 +1,9 @@ +interface GranblueElement { + [key: string]: any + id: number + weaknessId: number + name: { + en: string + ja: string + } +} diff --git a/utils/elements.tsx b/utils/elements.tsx new file mode 100644 index 00000000..9c99f870 --- /dev/null +++ b/utils/elements.tsx @@ -0,0 +1,60 @@ +const elements: GranblueElement[] = [ + { + id: 0, + weaknessId: 0, + name: { + en: 'null', + ja: '無', + }, + }, + { + id: 1, + weaknessId: 2, + name: { + en: 'wind', + ja: '風', + }, + }, + { + id: 2, + weaknessId: 3, + name: { + en: 'fire', + ja: '火', + }, + }, + { + id: 3, + weaknessId: 4, + name: { + en: 'water', + ja: '水', + }, + }, + { + id: 4, + weaknessId: 1, + name: { + en: 'earth', + ja: '土', + }, + }, + { + id: 5, + weaknessId: 5, + name: { + en: 'dark', + ja: '闇', + }, + }, + { + id: 6, + weaknessId: 6, + name: { + en: 'light', + ja: '光', + }, + }, +] + +export default elements