v1/UI/pages/_test/landing-mock.js
2019-03-10 19:47:38 -05:00

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>
}
}