+
{this.props.title}
+ {login}
+ {loading}
+ {error}
+ {orders}
+
+ );
+ }
+
+ public signIn(): void {
+ this.authCtx.login();
+ }
+
+ private loadOrders(): void {
+ this.setState((previousState: IRecentOrdersState, props: IRecentOrdersProps): IRecentOrdersState => {
+ previousState.loading = true;
+ return previousState;
+ });
+
+ this.getOrdersAccessToken()
+ .then((accessToken: string): Promise