mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-21 10:45:20 -04:00
Iframe communicator context (2/3) (#1310)
* Add type Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de> * Extract code and add new context provider Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de> * Adjust import Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
829cc2fe48
commit
6285af458a
10 changed files with 189 additions and 154 deletions
|
@ -4,7 +4,7 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import React, { Fragment, useState } from 'react'
|
||||
import React, { useState } from 'react'
|
||||
import { Trans } from 'react-i18next'
|
||||
import { Branding } from '../common/branding/branding'
|
||||
import {
|
||||
|
@ -19,13 +19,14 @@ import { useIntroPageContent } from './hooks/use-intro-page-content'
|
|||
import { ShowIf } from '../common/show-if/show-if'
|
||||
import { RendererType } from '../render-page/rendering-message'
|
||||
import { WaitSpinner } from '../common/wait-spinner/wait-spinner'
|
||||
import { IframeEditorToRendererCommunicatorContextProvider } from '../editor-page/render-context/iframe-editor-to-renderer-communicator-context-provider'
|
||||
|
||||
export const IntroPage: React.FC = () => {
|
||||
const introPageContent = useIntroPageContent()
|
||||
const [rendererReady, setRendererReady] = useState<boolean>(true)
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<IframeEditorToRendererCommunicatorContextProvider>
|
||||
<div className={'flex-fill mt-3'}>
|
||||
<h1 dir='auto' className={'align-items-center d-flex justify-content-center flex-column'}>
|
||||
<HedgeDocLogoWithText logoType={HedgeDocLogoType.COLOR_VERTICAL} size={HedgeDocLogoSize.BIG} />
|
||||
|
@ -52,6 +53,6 @@ export const IntroPage: React.FC = () => {
|
|||
<hr className={'mb-5'} />
|
||||
</div>
|
||||
<FeatureLinks />
|
||||
</Fragment>
|
||||
</IframeEditorToRendererCommunicatorContextProvider>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue