-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
app/javascript/StorefrontApp/features/company/LogoutButton.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { useCompany } from './companySlice'; | ||
import OffIcon from '@mui/icons-material/PowerSettingsNewRounded' | ||
import { IconButton } from '@mui/material'; | ||
|
||
const LogoutButton = () => { | ||
const { onLogout } = useCompany(); | ||
|
||
return ( | ||
<IconButton | ||
style={{ | ||
position: 'absolute', | ||
left: '1rem', | ||
bottom: '1rem', | ||
}} | ||
aria-label="Log Out" | ||
size='small' | ||
onClick={() => onLogout()} | ||
> | ||
<OffIcon fontSize='inherit' /> | ||
</IconButton> | ||
); | ||
}; | ||
export default LogoutButton; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters