Skip to content

Commit ac00369

Browse files
Merge pull request #46 from Typext/bugfix/header-user-name-button
Bugfix/header user name button
2 parents 3a33267 + 15fd418 commit ac00369

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/components/Header/index.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ const Header = () => {
3131
history.push('/minute');
3232
}, [history]);
3333

34+
const handleNavigateToUserUpdate = useCallback(() => {
35+
history.push('/user/update');
36+
}, [history]);
37+
3438
return (
3539
<StyledHeader>
3640
<section className="shortOptions">
@@ -48,7 +52,9 @@ const Header = () => {
4852
</figure>
4953

5054
<section className="usernameAndLogout">
51-
<h1>{user?.name || 'Nome do usuário'}</h1>
55+
<button type="button" onClick={handleNavigateToUserUpdate}>
56+
<h1>{user?.name || 'Nome do usuário'}</h1>
57+
</button>
5258

5359
<button type="button" onClick={handleLogout}>
5460
<img src={logoutIcon} alt="logout" />

0 commit comments

Comments
 (0)