From 3b4b8ecc1a1028cd9a12d7477adfdb52ed025602 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Sun, 27 Feb 2022 00:35:05 -0800 Subject: [PATCH] Add User and Party types --- pages/[username].tsx | 15 --------------- types/Party.d.ts | 13 +++++++++++++ types/User.d.ts | 5 +++++ 3 files changed, 18 insertions(+), 15 deletions(-) create mode 100644 types/Party.d.ts create mode 100644 types/User.d.ts diff --git a/pages/[username].tsx b/pages/[username].tsx index a5d309c8..33702575 100644 --- a/pages/[username].tsx +++ b/pages/[username].tsx @@ -7,21 +7,6 @@ import ProfileHeader from '~components/ProfileHeader' import GridRep from '~components/GridRep' import GridRepCollection from '~components/GridRepCollection' -interface User { - id: string - username: string - granblueId: number -} - -interface Party { - id: string - name: string - raid: Raid - shortcode: string - weapons: GridWeapon[] - updated_at: string -} - const ProfileRoute: React.FC = () => { const router = useRouter() const { username } = router.query diff --git a/types/Party.d.ts b/types/Party.d.ts new file mode 100644 index 00000000..94db577d --- /dev/null +++ b/types/Party.d.ts @@ -0,0 +1,13 @@ +interface Party { + id: string + name: string + raid: Raid + shortcode: string + extra: boolean + characters: Array + weapons: Array + summons: Array + user: User + created_at: string + updated_at: string +} \ No newline at end of file diff --git a/types/User.d.ts b/types/User.d.ts new file mode 100644 index 00000000..744291f6 --- /dev/null +++ b/types/User.d.ts @@ -0,0 +1,5 @@ +interface User { + id: string + username: string + granblueId: number +} \ No newline at end of file