mirror of
https://github.com/usatiuk/writer.git
synced 2025-10-28 16:07:49 +01:00
stub account page
This commit is contained in:
0
frontend/src/Account/Account.scss
Normal file
0
frontend/src/Account/Account.scss
Normal file
7
frontend/src/Account/Account.tsx
Normal file
7
frontend/src/Account/Account.tsx
Normal file
@@ -0,0 +1,7 @@
|
||||
import * as React from "react";
|
||||
|
||||
export function AccountComponent() {
|
||||
return <div>Hello</div>;
|
||||
}
|
||||
|
||||
export { AccountComponent as Account };
|
||||
12
frontend/src/Account/tests/Account.test.tsx
Normal file
12
frontend/src/Account/tests/Account.test.tsx
Normal 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");
|
||||
});
|
||||
});
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user