From 7f52eed4d5d2376fa5f58f555d8508c0c5f0cb1b Mon Sep 17 00:00:00 2001 From: asmsuechan Date: Mon, 14 Aug 2017 10:07:20 +0900 Subject: [PATCH] Move condition of trash or not --- browser/main/NewNoteButton/index.js | 36 +++++++++++++---------------- browser/main/TopBar/index.js | 7 +++--- 2 files changed, 20 insertions(+), 23 deletions(-) diff --git a/browser/main/NewNoteButton/index.js b/browser/main/NewNoteButton/index.js index f41bca44..5dd7eb20 100644 --- a/browser/main/NewNoteButton/index.js +++ b/browser/main/NewNoteButton/index.js @@ -68,27 +68,23 @@ class NewNoteButton extends React.Component { } render () { - const { config, style, data, location } = this.props - if (location.pathname === '/trashed') { - return '' - } else { - return ( -
-
- -
+ const { config, style, data } = this.props + return ( +
+
+
- ) - } +
+ ) } } diff --git a/browser/main/TopBar/index.js b/browser/main/TopBar/index.js index b969af17..c469adb4 100644 --- a/browser/main/TopBar/index.js +++ b/browser/main/TopBar/index.js @@ -75,7 +75,7 @@ class TopBar extends React.Component { } render () { - let { config, style, data } = this.props + let { config, style, data, location } = this.props return (
- + />}
) }