diff --git a/components/Party/index.tsx b/components/Party/index.tsx index f9f2196b..e935947c 100644 --- a/components/Party/index.tsx +++ b/components/Party/index.tsx @@ -167,8 +167,18 @@ const Party = (props: Props) => { storeWeapons(team.weapons) storeSummons(team.summons) + // Create a string to send the user back to the tab they're currently on + let tab = '' + if (currentTab === GridType.Character) { + tab = 'characters' + } else if (currentTab === GridType.Summon) { + tab = 'summons' + } + // Then, push the browser history to the new party's URL - if (props.pushHistory) props.pushHistory(`/p/${team.shortcode}`) + if (props.pushHistory) { + props.pushHistory(`/p/${team.shortcode}/${tab}`) + } return team } diff --git a/utils/enums.tsx b/utils/enums.tsx index a1de0ccf..df2c0c84 100644 --- a/utils/enums.tsx +++ b/utils/enums.tsx @@ -5,7 +5,6 @@ export enum ButtonType { } export enum GridType { - Class, Character, Weapon, Summon,