mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 03:06:31 -05:00
fix(newPage): replace show if with inline condition
Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
b22eb18aba
commit
217b42d76a
1 changed files with 1 additions and 5 deletions
|
@ -6,11 +6,9 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
import { createNote } from '../../../api/notes'
|
||||
import type { Note } from '../../../api/notes/types'
|
||||
import { LoadingScreen } from '../../../components/application-loader/loading-screen/loading-screen'
|
||||
import { CustomAsyncLoadingBoundary } from '../../../components/common/async-loading-boundary/custom-async-loading-boundary'
|
||||
import { Redirect } from '../../../components/common/redirect'
|
||||
import { ShowIf } from '../../../components/common/show-if/show-if'
|
||||
import { CommonErrorPage } from '../../../components/error-pages/common-error-page'
|
||||
import { useSingleStringUrlParameter } from '../../../hooks/common/use-single-string-url-parameter'
|
||||
import type { NextPage } from 'next'
|
||||
|
@ -38,9 +36,7 @@ const NewNotePage: NextPage = () => {
|
|||
descriptionI18nKey={'errors.noteCreationFailed.description'}
|
||||
/>
|
||||
}>
|
||||
<ShowIf condition={!!value}>
|
||||
<Redirect to={`/n/${(value as Note).metadata.primaryAddress}`} replace={true} />
|
||||
</ShowIf>
|
||||
{value !== undefined && <Redirect to={`/n/${value.metadata.primaryAddress}`} replace={true} />}
|
||||
</CustomAsyncLoadingBoundary>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue