Skip to content

Commit 72dd3c3

Browse files
committed
refactor: simplify HeaderButtons component by removing translation and replacing Button with ActionIcon for logout
1 parent 923f50a commit 72dd3c3

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/features/ui/dashboard/header-buttons/header-buttons.feature.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { PiArrowsClockwise, PiSignOutDuotone } from 'react-icons/pi'
2-
import { ActionIcon, Button, Group } from '@mantine/core'
3-
import { useTranslation } from 'react-i18next'
2+
import { ActionIcon, Group } from '@mantine/core'
43
import { useNavigate } from 'react-router-dom'
54

65
import { LanguagePicker } from '@shared/ui/language-picker/language-picker.shared'
@@ -11,8 +10,6 @@ import { ROUTES } from '@shared/constants'
1110
import { useAuth } from '@shared/hooks'
1211

1312
export const HeaderButtons = () => {
14-
const { t } = useTranslation()
15-
1613
const { setIsAuthenticated } = useAuth()
1714
const navigate = useNavigate()
1815

@@ -38,9 +35,9 @@ export const HeaderButtons = () => {
3835
<PiArrowsClockwise size="1.5rem" />
3936
</ActionIcon>
4037

41-
<Button leftSection={<PiSignOutDuotone size="1rem" />} onClick={handleLogout} size="md">
42-
{t('header-buttons.feature.logout')}
43-
</Button>
38+
<ActionIcon color="cyan" onClick={handleLogout} size="xl">
39+
<PiSignOutDuotone size="1.5rem" />
40+
</ActionIcon>
4441
</Group>
4542
)
4643
}

0 commit comments

Comments
 (0)