mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-31 23:28:34 -04:00
Switch the base framework from Create React App to Next.JS
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
a979b6ffdd
commit
77a60c6c48
361 changed files with 5130 additions and 9605 deletions
|
@ -1,45 +0,0 @@
|
|||
/*
|
||||
SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import React, { Fragment } from 'react'
|
||||
import { Col, Row } from 'react-bootstrap'
|
||||
import { Redirect } from 'react-router'
|
||||
import { useApplicationState } from '../../hooks/common/use-application-state'
|
||||
import { LoginProvider } from '../../redux/user/types'
|
||||
import { ShowIf } from '../common/show-if/show-if'
|
||||
import { ProfileAccessTokens } from './access-tokens/profile-access-tokens'
|
||||
import { ProfileAccountManagement } from './account-management/profile-account-management'
|
||||
import { ProfileChangePassword } from './settings/profile-change-password'
|
||||
import { ProfileDisplayName } from './settings/profile-display-name'
|
||||
|
||||
/**
|
||||
* Profile page that includes forms for changing display name, password (if internal login is used),
|
||||
* managing access tokens and deleting the account.
|
||||
*/
|
||||
export const ProfilePage: React.FC = () => {
|
||||
const userProvider = useApplicationState((state) => state.user?.provider)
|
||||
|
||||
if (!userProvider) {
|
||||
return <Redirect to={'/login'} />
|
||||
}
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<div className='my-3'>
|
||||
<Row className='h-100 flex justify-content-center'>
|
||||
<Col lg={6}>
|
||||
<ProfileDisplayName />
|
||||
<ShowIf condition={userProvider === LoginProvider.LOCAL}>
|
||||
<ProfileChangePassword />
|
||||
</ShowIf>
|
||||
<ProfileAccessTokens />
|
||||
<ProfileAccountManagement />
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
</Fragment>
|
||||
)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue