mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-17 00:24:43 -04:00
Restructure redux code (#109)
* Restructure redux code Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Co-authored-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
parent
db5bec7000
commit
570c45017c
28 changed files with 214 additions and 231 deletions
|
@ -1,17 +1,21 @@
|
|||
import { Dropdown } from 'react-bootstrap'
|
||||
import React from 'react'
|
||||
import { Dropdown } from 'react-bootstrap'
|
||||
import { Trans, useTranslation } from 'react-i18next'
|
||||
import { useSelector } from 'react-redux'
|
||||
import { LinkContainer } from 'react-router-bootstrap'
|
||||
import { ForkAwesomeIcon } from '../../../../../fork-awesome/fork-awesome-icon'
|
||||
import { ApplicationState } from '../../../../../redux'
|
||||
import { LinkContainer } from 'react-router-bootstrap'
|
||||
import { clearUser } from '../../../../../redux/user/methods'
|
||||
import { Trans, useTranslation } from 'react-i18next'
|
||||
import { UserAvatar } from '../../user-avatar/user-avatar'
|
||||
|
||||
export const UserDropdown: React.FC = () => {
|
||||
useTranslation()
|
||||
const user = useSelector((state: ApplicationState) => state.user)
|
||||
|
||||
if (!user) {
|
||||
return null
|
||||
}
|
||||
|
||||
return (
|
||||
<Dropdown alignRight>
|
||||
<Dropdown.Toggle size="sm" variant="dark" id="dropdown-user" className={'d-flex align-items-center'}>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue