Просмотр исходного кода

hide without userNotifications

itizawa 6 лет назад
Родитель
Сommit
7c6e5cb048
1 измененных файлов с 4 добавлено и 2 удалено
  1. 4 2
      src/client/js/components/Admin/Notification/UserTriggerNotification.jsx

+ 4 - 2
src/client/js/components/Admin/Notification/UserTriggerNotification.jsx

@@ -64,7 +64,7 @@ class UserTriggerNotification extends React.Component {
 
 
   // TODO GW-788 i18n
   // TODO GW-788 i18n
   render() {
   render() {
-    const { t } = this.props;
+    const { t, adminNotificationContainer } = this.props;
 
 
     return (
     return (
       <React.Fragment>
       <React.Fragment>
@@ -110,7 +110,9 @@ class UserTriggerNotification extends React.Component {
                 <button type="button" className="btn btn-primary" disabled={!this.validateForm()} onClick={this.onClickSubmit}>{t('add')}</button>
                 <button type="button" className="btn btn-primary" disabled={!this.validateForm()} onClick={this.onClickSubmit}>{t('add')}</button>
               </td>
               </td>
             </tr>
             </tr>
-            <UserNotificationList />
+            {adminNotificationContainer.state.userNotifications.length !== 0
+              && <UserNotificationList />
+            }
           </tbody>
           </tbody>
         </table>
         </table>
       </React.Fragment>
       </React.Fragment>