Skip to content

Commit c5ccd5f

Browse files
vuluongj20ryan953
authored andcommitted
fix(issueDetails): Highlight Tags tab in Tag Details page (#39348)
**Before:** we're in the Tag Details page, but the "Details" tab is highlighted <img width="833" alt="Screen Shot 2022-09-27 at 10 49 16 AM" src="https://user-images.githubusercontent.com/44172267/192599880-60c859f9-49d5-422e-adf6-7223ea2b2739.png"> **After:** the "Tags" tab is correctly highlighted <img width="833" alt="Screen Shot 2022-09-27 at 10 49 01 AM" src="https://user-images.githubusercontent.com/44172267/192599832-9e7134eb-53ed-4e6b-8342-28d62fcd6109.png">
1 parent 607a6ff commit c5ccd5f

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

static/app/views/organizationGroupDetails/groupDetails.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,16 @@ class GroupDetails extends Component<Props, State> {
198198
const {event} = this.state;
199199

200200
const currentRoute = routes[routes.length - 1];
201-
const currentTab =
202-
Object.values(Tab).find(tab => currentRoute.path === TabPaths[tab]) ?? Tab.DETAILS;
201+
202+
let currentTab: Tab;
203+
// If we're in the tag details page ("/tags/:tagKey/")
204+
if (router.params.tagKey) {
205+
currentTab = Tab.TAGS;
206+
} else {
207+
currentTab =
208+
Object.values(Tab).find(tab => currentRoute.path === TabPaths[tab]) ??
209+
Tab.DETAILS;
210+
}
203211

204212
const baseUrl = `/organizations/${organization.slug}/issues/${group.id}/${
205213
router.params.eventId && event ? `events/${event.id}/` : ''

0 commit comments

Comments
 (0)