ProfilePage: more pathname.endsWith fixes

environments/review-account-re-xv4rvn/deployments/752
Alex Gleason 2022-08-11 13:59:06 -05:00
rodzic e37611d55b
commit 8c94a4b882
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -81,11 +81,11 @@ const ProfilePage: React.FC<IProfilePage> = ({ params, children }) => {
let activeItem;
const pathname = history.location.pathname.replace(`@${username}/`, '');
if (pathname.includes('with_replies')) {
if (pathname.endsWith('/with_replies')) {
activeItem = 'replies';
} else if (pathname.includes('media')) {
} else if (pathname.endsWith('/media')) {
activeItem = 'media';
} else if (pathname.includes('favorites')) {
} else if (pathname.endsWith('/favorites')) {
activeItem = 'likes';
} else {
activeItem = 'profile';