mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-29 06:15:29 -04:00
Restructure repository (#426)
organized repository Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Co-authored-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Co-authored-by: Philip Molares <git@molar.es>
This commit is contained in:
parent
66258ca615
commit
0fadc09f2b
254 changed files with 384 additions and 403 deletions
34
src/components/profile-page/profile-page.tsx
Normal file
34
src/components/profile-page/profile-page.tsx
Normal file
|
@ -0,0 +1,34 @@
|
|||
import React from 'react'
|
||||
import { Col, Row } from 'react-bootstrap'
|
||||
import { useSelector } from 'react-redux'
|
||||
import { Redirect } from 'react-router'
|
||||
import { ApplicationState } from '../../redux'
|
||||
import { LoginProvider } from '../../redux/user/types'
|
||||
import { ShowIf } from '../common/show-if/show-if'
|
||||
import { ProfileAccountManagement } from './settings/profile-account-management'
|
||||
import { ProfileChangePassword } from './settings/profile-change-password'
|
||||
import { ProfileDisplayName } from './settings/profile-display-name'
|
||||
|
||||
export const ProfilePage: React.FC = () => {
|
||||
const user = useSelector((state: ApplicationState) => state.user)
|
||||
|
||||
if (!user) {
|
||||
return (
|
||||
<Redirect to={'/login'}/>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="my-3">
|
||||
<Row className="h-100 flex justify-content-center">
|
||||
<Col lg={6}>
|
||||
<ProfileDisplayName/>
|
||||
<ShowIf condition={user.provider === LoginProvider.INTERNAL}>
|
||||
<ProfileChangePassword/>
|
||||
</ShowIf>
|
||||
<ProfileAccountManagement/>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue