Skip to content

Commit

Permalink
Add server-side rendering notes
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenjohnson committed Oct 21, 2022
1 parent 0596544 commit f7df2ab
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/components/HyloEditor/HyloEditorMobile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'

/*
Expand Down Expand Up @@ -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
}
})

Expand Down
3 changes: 2 additions & 1 deletion src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<StaticRouter location={req.url} context={context}>
Expand Down
2 changes: 2 additions & 0 deletions src/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down

0 comments on commit f7df2ab

Please sign in to comment.