mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-04-25 20:19:12 +00:00
26 lines
638 B
JavaScript
26 lines
638 B
JavaScript
// @flow
|
|
import * as React from 'react'
|
|
import type { PageProps } from '../../types'
|
|
import HeaderBar from '../../containers/header-bar'
|
|
import { withCookies } from '../../config/rpc'
|
|
import { type UserPartial } from '../../../services/discord'
|
|
|
|
type InitialProps = {
|
|
user: ?UserPartial
|
|
}
|
|
|
|
export default class LandingTest extends React.Component<PageProps & InitialProps> {
|
|
static async getInitialProps (ctx: PageProps): Promise<InitialProps> {
|
|
const rpc = withCookies(ctx)
|
|
|
|
return {
|
|
user: await rpc.getCurrentUser()
|
|
}
|
|
}
|
|
|
|
render () {
|
|
return <div>
|
|
<HeaderBar user={this.props.user} />
|
|
</div>
|
|
}
|
|
}
|