refactor(common): extract frontmatter code into commons

Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Philip Molares 2023-03-26 12:30:16 +02:00 committed by Tilman Vatteroth
parent 8bd7fd1be8
commit 8e57188ab5
7 changed files with 14 additions and 8 deletions

View file

@ -4,7 +4,6 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { useApplicationState } from '../../../hooks/common/use-application-state'
import { NoteType } from '../../../redux/note-details/types/note-details'
import { NewNoteButton } from '../../common/new-note-button/new-note-button'
import { ShowIf } from '../../common/show-if/show-if'
import { SignInButton } from '../../landing-layout/navigation/sign-in-button'
@ -15,6 +14,7 @@ import { HelpButton } from './help-button/help-button'
import { NavbarBranding } from './navbar-branding'
import { ReadOnlyModeButton } from './read-only-mode-button'
import { SlideModeButton } from './slide-mode-button'
import { NoteType } from '@hedgedoc/commons'
import React from 'react'
import { Nav, Navbar } from 'react-bootstrap'

View file

@ -5,11 +5,11 @@
*/
import { useApplicationState } from '../../../../hooks/common/use-application-state'
import { useBaseUrl } from '../../../../hooks/common/use-base-url'
import { NoteType } from '../../../../redux/note-details/types/note-details'
import { CopyableField } from '../../../common/copyable/copyable-field/copyable-field'
import type { ModalVisibilityProps } from '../../../common/modals/common-modal'
import { CommonModal } from '../../../common/modals/common-modal'
import { ShowIf } from '../../../common/show-if/show-if'
import { NoteType } from '@hedgedoc/commons'
import React from 'react'
import { Modal } from 'react-bootstrap'
import { Trans, useTranslation } from 'react-i18next'

View file

@ -5,13 +5,13 @@
*/
import { useApplicationState } from '../../../hooks/common/use-application-state'
import { useTrimmedNoteMarkdownContentWithoutFrontmatter } from '../../../hooks/common/use-trimmed-note-markdown-content-without-frontmatter'
import { NoteType } from '../../../redux/note-details/types/note-details'
import { setRendererStatus } from '../../../redux/renderer-status/methods'
import { RendererType } from '../../render-page/window-post-message-communicator/rendering-message'
import type { RenderIframeProps } from '../renderer-pane/render-iframe'
import { RenderIframe } from '../renderer-pane/render-iframe'
import { useOnScrollWithLineOffset } from './hooks/use-on-scroll-with-line-offset'
import { useScrollStateWithoutLineOffset } from './hooks/use-scroll-state-without-line-offset'
import { NoteType } from '@hedgedoc/commons'
import React from 'react'
export type EditorDocumentRendererProps = Omit<