From 6ca0bd06681f97f754210d9b6d88a9193573d88e Mon Sep 17 00:00:00 2001 From: Tilman Vatteroth Date: Sun, 14 May 2023 08:27:55 +0200 Subject: [PATCH] refactor: use showif instead of ternary operator Signed-off-by: Tilman Vatteroth --- frontend/src/pages/new.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/src/pages/new.tsx b/frontend/src/pages/new.tsx index 86e24c13b..1a5f8eef4 100644 --- a/frontend/src/pages/new.tsx +++ b/frontend/src/pages/new.tsx @@ -4,12 +4,15 @@ * 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' +import React from 'react' import { useAsync } from 'react-use' /** @@ -33,7 +36,9 @@ export const NewNotePage: NextPage = () => { descriptionI18nKey={'errors.noteCreationFailed.description'} /> }> - {value ? : null} + + + ) }