stub account page

This commit is contained in:
2019-12-20 22:57:54 +03:00
parent f7ffaf498d
commit 3f91e190f6
4 changed files with 29 additions and 0 deletions

View File

View File

@@ -0,0 +1,7 @@
import * as React from "react";
export function AccountComponent() {
return <div>Hello</div>;
}
export { AccountComponent as Account };

View File

@@ -0,0 +1,12 @@
import * as React from "react";
import { shallow } from "enzyme";
import { AccountComponent } from "../Account";
describe("<Account />", () => {
it("should say hello", () => {
const wrapper = shallow(<AccountComponent />);
expect(wrapper.text()).toBe("Hello");
});
});

View File

@@ -19,6 +19,7 @@ import { animated, config, Transition } from "react-spring/renderprops";
import { Dispatch } from "redux";
import { IDocumentJSON } from "~../../src/entity/Document";
import { IUserJSON } from "~../../src/entity/User";
import { Account } from "~Account/Account";
import { DocumentEdit } from "~Documents/DocumentEdit";
import { DocumentView } from "~Documents/DocumentView";
import { Overview } from "~Documents/Overview";
@@ -134,6 +135,10 @@ export class HomeComponent extends React.PureComponent<IHomeProps> {
path="/docs/:id"
component={DocumentView}
/>
<Route
path="/account"
component={Account}
/>
<Route path="/" component={Overview} />
</Switch>
</animated.div>
@@ -148,6 +153,11 @@ export class HomeComponent extends React.PureComponent<IHomeProps> {
private menu() {
return (
<Menu>
<Menu.Item
icon="user"
text="Account"
onClick={() => this.props.history.push("/account")}
/>
<Menu.Item
icon="log-out"
text="Logout"