-
Notifications
You must be signed in to change notification settings - Fork 4
/
AccountPage.tsx
40 lines (35 loc) · 1.06 KB
/
AccountPage.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import * as React from "react";
import { Store } from "@reduxjs/toolkit";
import * as PropTypes from "prop-types";
import ChangePasswordForm from "./ChangePasswordForm";
import { RootState } from "../store";
import Header from "./Header";
import Footer from "./Footer";
import title from "../utils/title";
export interface AccountPageContext {
editorStore: Store<RootState>;
csrfToken: string;
}
/** Page for configuring account settings. */
export default class AccountPage extends React.Component<object, object> {
context: AccountPageContext;
static contextTypes: React.ValidationMap<AccountPageContext> = {
editorStore: PropTypes.object.isRequired as React.Validator<Store>,
csrfToken: PropTypes.string.isRequired,
};
render(): JSX.Element {
return (
<div className="account">
<Header />
<ChangePasswordForm
store={this.context.editorStore}
csrfToken={this.context.csrfToken}
/>
<Footer />
</div>
);
}
UNSAFE_componentWillMount() {
document.title = title("Account");
}
}