Page MenuHomePhorge

landing-ssr.react.js
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

landing-ssr.react.js

// @flow
import * as React from 'react';
import { StaticRouter } from 'react-router';
import { type SIWEMessageType } from 'lib/types/siwe-types.js';
import Landing from './landing.react.js';
import { SIWEContext } from './siwe-context.js';
export type LandingSSRProps = {
+url: string,
+basename: string,
+siweNonce: ?string,
+siwePrimaryIdentityPublicKey: ?string,
+siweMessageType: ?SIWEMessageType,
};
function LandingSSR(props: LandingSSRProps): React.Node {
const {
url,
basename,
siweNonce,
siwePrimaryIdentityPublicKey,
siweMessageType,
} = props;
const siweContextValue = React.useMemo(
() => ({
siweNonce,
siwePrimaryIdentityPublicKey,
siweMessageType,
}),
[siweNonce, siwePrimaryIdentityPublicKey, siweMessageType],
);
const routerContext = React.useMemo(() => ({}), []);
return (
<StaticRouter location={url} basename={basename} context={routerContext}>
<SIWEContext.Provider value={siweContextValue}>
<Landing />
</SIWEContext.Provider>
</StaticRouter>
);
}
export default LandingSSR;

File Metadata

Mime Type
text/x-java
Expires
Fri, Jan 9, 12:38 PM (20 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5868299
Default Alt Text
landing-ssr.react.js (1 KB)

Event Timeline