From 8c73c1360fe137619dfc89dc0b1efad808b9301b Mon Sep 17 00:00:00 2001 From: insanity Date: Fri, 1 Sep 2017 15:14:30 +0900 Subject: [PATCH] account menu --- .../@overflow/app/views/layout/LeftMenu.tsx | 85 ++++++++++--------- src/ts/@overflow/app/views/layout/Routes.tsx | 0 2 files changed, 46 insertions(+), 39 deletions(-) delete mode 100644 src/ts/@overflow/app/views/layout/Routes.tsx diff --git a/src/ts/@overflow/app/views/layout/LeftMenu.tsx b/src/ts/@overflow/app/views/layout/LeftMenu.tsx index f262abc..397652e 100644 --- a/src/ts/@overflow/app/views/layout/LeftMenu.tsx +++ b/src/ts/@overflow/app/views/layout/LeftMenu.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import { connect, Dispatch } from 'react-redux'; import { push as routerPush } from 'react-router-redux'; -import { Menu, Dropdown, Icon, Header, Image } from 'semantic-ui-react'; +import { Menu, Dropdown, Icon, Header, Image, Accordion } from 'semantic-ui-react'; export interface StateProps { } @@ -23,22 +23,52 @@ class LeftMenu extends React.Component { this.state = { }; - window.addEventListener('resize', () => { - console.log(window); - }); + // window.addEventListener('resize', () => { + // console.log(window); + // }); } - - public render(): JSX.Element { + let userMenu = + + +
+ + + this.props.onChangeUrl('/account/signin')} style={{ 'marginLeft': '30px' }}> + Sign In + + this.props.onChangeUrl('/account/signup')} style={{ 'marginLeft': '30px' }}> + Sign Up + + this.props.onChangeUrl('/account/pw_confirm')} style={{ 'marginLeft': '30px' }}> + PW Confirm + + this.props.onChangeUrl('/account/modify')} style={{ 'marginLeft': '30px' }}> + Modify + + this.props.onChangeUrl('/account/logout')} style={{ 'marginLeft': '30px' }}> + Log Out + + + ; + return ( - -
- -
-
+ + + +
+ +
+
+
+ + {userMenu} + +
+
@@ -108,36 +138,13 @@ class LeftMenu extends React.Component {
- - - -
- - - this.props.onChangeUrl('/account/signin')} style={{ 'marginLeft': '30px' }}> - Sign In - - this.props.onChangeUrl('/account/signup')} style={{ 'marginLeft': '30px' }}> - Sign Up - - this.props.onChangeUrl('/account/pw_confirm')} style={{ 'marginLeft': '30px' }}> - PW Confirm - - this.props.onChangeUrl('/account/modify')} style={{ 'marginLeft': '30px' }}> - Modify - - this.props.onChangeUrl('/account/logout')} style={{ 'marginLeft': '30px' }}> - Log Out - - this.props.onChangeUrl('/temp/discoveryTree')} style={{ 'marginLeft': '30px' }}> - Discovery Tree - - -
- ); } + + private handleMemberMenu = () => { + alert('member'); + } } diff --git a/src/ts/@overflow/app/views/layout/Routes.tsx b/src/ts/@overflow/app/views/layout/Routes.tsx deleted file mode 100644 index e69de29..0000000