From 648c7a6561b7f3450a0cba7f3824653b9a6208db Mon Sep 17 00:00:00 2001 From: snoop Date: Wed, 12 Jul 2017 17:56:42 +0900 Subject: [PATCH] notification bar callback --- src/ts/Routes.tsx | 3 +++ src/ts/containers/test/TopBar.tsx | 2 +- src/ts/containers/test/layout/Header.tsx | 2 +- src/ts/containers/test/layout/Layout.tsx | 14 +++++++------- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/ts/Routes.tsx b/src/ts/Routes.tsx index 79a80fe..bd3fa4c 100644 --- a/src/ts/Routes.tsx +++ b/src/ts/Routes.tsx @@ -13,6 +13,9 @@ import { Components } from './containers/test/Components'; export class Routes extends React.Component { + constructor(props: any, context: any) { + super(props, context); + } render() { return (
diff --git a/src/ts/containers/test/TopBar.tsx b/src/ts/containers/test/TopBar.tsx index c84a6c0..8aaaa10 100644 --- a/src/ts/containers/test/TopBar.tsx +++ b/src/ts/containers/test/TopBar.tsx @@ -94,7 +94,7 @@ export class TopBar extends React.Component { { - this.setState({ notification_visible: !this.state.notification_visible }) + this.props.onSidebar(); }}> diff --git a/src/ts/containers/test/layout/Header.tsx b/src/ts/containers/test/layout/Header.tsx index bdb111b..fba00ce 100644 --- a/src/ts/containers/test/layout/Header.tsx +++ b/src/ts/containers/test/layout/Header.tsx @@ -12,7 +12,7 @@ export class Header extends React.Component { render() { return ( - + ); } } diff --git a/src/ts/containers/test/layout/Layout.tsx b/src/ts/containers/test/layout/Layout.tsx index fe72c37..4666b1c 100644 --- a/src/ts/containers/test/layout/Layout.tsx +++ b/src/ts/containers/test/layout/Layout.tsx @@ -14,13 +14,18 @@ export class Layout extends React.Component { constructor(props: any, context: any) { super(props, context); this.state = { + notification_visible:false, }; } + onSidebar = () => { + this.setState({notification_visible:!this.state.notification_visible}) + } + render() { return (
-
+
{ - - - - +