import * as React from 'react'; import { RouteComponentProps } from 'react-router'; import * as GQL from '../../backend/graphqlschema'; import { ExtensionsProps } from '../../extensions/ExtensionsClientCommonContext'; import { RouteDescriptor } from '../../util/contributions'; import { ErrorLike } from '../../util/errors'; import { UserAccountAreaRoute } from '../account/UserAccountArea'; import { UserAccountSidebarItems } from '../account/UserAccountSidebar'; import { UserAreaHeaderNavItem } from './UserAreaHeader'; export interface UserAreaRoute extends RouteDescriptor { } interface UserAreaProps extends RouteComponentProps<{ username: string; }>, ExtensionsProps { userAreaRoutes: ReadonlyArray; userAreaHeaderNavItems: ReadonlyArray; userAccountSideBarItems: UserAccountSidebarItems; userAccountAreaRoutes: ReadonlyArray; /** * The currently authenticated user, NOT the user whose username is specified in the URL's "username" route * parameter. */ user: GQL.IUser | null; isLightTheme: boolean; } interface UserAreaState { /** * The fetched user or an error if an error occurred; undefined while loading. */ userOrError?: GQL.IUser | ErrorLike; } /** * Properties passed to all page components in the user area. */ export interface UserAreaRouteContext extends ExtensionsProps { /** The extension registry area main URL. */ url: string; /** * The user who is the subject of the page. */ user: GQL.IUser; /** Called when the user is updated and must be reloaded. */ onDidUpdateUser: () => void; /** * The currently authenticated user, NOT (necessarily) the user who is the subject of the page. * * For example, if Alice is viewing a user area page about Bob, then the authenticatedUser is Alice and the * user is Bob. */ authenticatedUser: GQL.IUser | null; isLightTheme: boolean; userAccountSideBarItems: UserAccountSidebarItems; userAccountAreaRoutes: ReadonlyArray; } /** * A user's public profile area. */ export declare class UserArea extends React.Component { state: UserAreaState; private routeMatchChanges; private refreshRequests; private subscriptions; componentDidMount(): void; componentWillReceiveProps(props: UserAreaProps): void; componentWillUnmount(): void; render(): JSX.Element | null; private onDidUpdateUser; } export {}; //# sourceMappingURL=UserArea.d.ts.map