Description
I am really stuck in trying to figure out how to use the AuthUserContext to get to the attributes stored in the user collection for the user with the uid from the authUser.
I can do:
[import React from 'react';
import { compose } from 'recompose';
import { Divider, Layout, Card, Tabs, Typography } from 'antd';
import { AuthUserContext, withAuthorization, withEmailVerification } from '../Session/Index';
const Dashboard = () => (
<AuthUserContext.Consumer>
{authUser => (
<div>
{authUser.email}
</div>
)}
</AuthUserContext.Consumer>
);
const condition = authUser => !!authUser;
export default compose(
withEmailVerification,
withAuthorization(condition),
)(Dashboard);
](url)
What I want to do is get from authUser to the user collection attributes such as: title so that i can somehow display the user information for the currently authorised user.
Has anyone figured out how to do this?