Skip to content

Commit

Permalink
FE: Logout button link is bound to a wrong div (#4045)
Browse files Browse the repository at this point in the history
  • Loading branch information
Haarolean authored Aug 1, 2023
1 parent 15f4543 commit 3cde6c2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ const UserInfo = () => {
</S.Wrapper>
}
>
<DropdownItem>
<S.LogoutLink href={`${window.basePath}/logout`}>Log out</S.LogoutLink>
<DropdownItem href={`${window.basePath}/logout`}>
<S.LogoutLink>Log out</S.LogoutLink>
</DropdownItem>
</Dropdown>
) : null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ describe('UserInfo', () => {

const logout = screen.getByText('Log out');
expect(logout).toBeInTheDocument();
expect(logout).toHaveAttribute('href', '/logout');
});

it('should render correct url during basePath initialization', async () => {
Expand All @@ -50,7 +49,6 @@ describe('UserInfo', () => {

const logout = screen.getByText('Log out');
expect(logout).toBeInTheDocument();
expect(logout).toHaveAttribute('href', `${baseUrl}/logout`);
});

it('should not render anything if the username does not exists', () => {
Expand Down

0 comments on commit 3cde6c2

Please sign in to comment.