From f7df2ab99d656dab780a34ea1674594ee2a209f9 Mon Sep 17 00:00:00 2001 From: Loren Johnson Date: Thu, 20 Oct 2022 17:54:32 -0700 Subject: [PATCH] Add server-side rendering notes --- src/components/HyloEditor/HyloEditorMobile.js | 3 +-- src/router/index.js | 3 ++- src/server/index.js | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/HyloEditor/HyloEditorMobile.js b/src/components/HyloEditor/HyloEditorMobile.js index 55facd574..b679a0e19 100644 --- a/src/components/HyloEditor/HyloEditorMobile.js +++ b/src/components/HyloEditor/HyloEditorMobile.js @@ -3,7 +3,6 @@ import { pickBy } from 'lodash/fp' import { WebViewMessageTypes } from 'hylo-shared' import { sendMessageToWebView } from 'util/webView' import HyloEditor from 'components/HyloEditor' -import getQuerystringParam from 'store/selectors/getQuerystringParam' import './HyloEditorMobile.scss' /* @@ -47,7 +46,7 @@ export default function HyloEditorMobile (props) { if (editorRef.current) { sendMessageToWebView(WebViewMessageTypes.EDITOR.ON_ENTER, editorRef.current.getHTML()) - return getQuerystringParam('suppressEnterKeyPropagation', null, props) + return false } }) diff --git a/src/router/index.js b/src/router/index.js index d0739802a..c637b1bf0 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -24,7 +24,8 @@ export function clientRouter () { ) } -// Current SSR setup is deprecated and to be removed. See https://github.com/Hylozoic/hylo-evo/issues/1069 +// Note: Server-side Rendering +// ref: https://github.com/Hylozoic/hylo-evo/issues/1069 export function serverRouter (req, context) { return ( diff --git a/src/server/index.js b/src/server/index.js index 6c53ae75d..97c354769 100644 --- a/src/server/index.js +++ b/src/server/index.js @@ -18,6 +18,8 @@ export default function () { server.use(redirectToApp) handleStaticPages(server) server.use(express.static('build')) + // Note: Server-side Rendering + // ref: https://github.com/Hylozoic/hylo-evo/issues/1069 server.use(appMiddleware) const listener = server.listen(port, err => {