FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
frontend/ui/src/index.server.jsx at test · devhttps/frontend · GitHub
devhttps
/
frontend
Public
forked from
guardian/frontend
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
frontend
/
ui
/
src
/
index.server.jsx
Copy path
More file actions
More file actions
Latest commit
History
History
History
30 lines (25 loc) · 738 Bytes
Breadcrumbs
frontend
/
ui
/
src
/
index.server.jsx
Copy path
File metadata and controls
30 lines (25 loc) · 738 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//
@flow
/* eslint-disable global-require */
import
{
server
}
from
'@guardian/guui'
;
import
head
from
'components/head'
;
import
Body
from
'components/body'
;
// this should be managed by a route somehow
import
Application
from
'views/404'
;
const
app
=
server
(
)
;
// the main export for the JVM JS interpreter to run
// eslint-disable-next-line import/prefer-default-export
export
const
render
=
(
props
:
Object
)
=>
{
const
body
=
app
.
renderToString
(
<
Body
{
...
props
}
>
<
Application
{
...
props
}
/>
</
Body
>
)
;
const
css
=
app
.
extractCriticalCss
(
body
)
;
return
`
<!DOCTYPE html>
<html lang="en">
${
head
(
props
,
css
)
}
${
body
}
</html>
`
.
trim
(
)
;
}
;
Back
|
FazBrowse Home
|
New Git URL