diff --git a/.prettierrc b/.prettierrc index ee41b74..d421234 100644 --- a/.prettierrc +++ b/.prettierrc @@ -4,5 +4,5 @@ "semi": true, "singleQuote": true, "proseWrap": "preserve", - "printWidth": 120 + "printWidth": 100 } diff --git a/package.json b/package.json index c7ca6e2..e8c097e 100755 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "firebase": "^5.5.8", "firebase-admin": "^6.1.0", "firestore-export-import": "^0.1.6", + "global": "^4.3.2", "grommet": "^1.11.0", "har-validator": "^5.1.3", "next": "^7.0.1", @@ -18,6 +19,7 @@ "next-routes": "^1.4.2", "node-pre-gyp": "^0.12.0", "node-sass": "^4.10.0", + "now": "^12.1.9", "react": "^16.6.1", "react-dom": "^16.6.1", "react-parallax": "^2.0.1", diff --git a/pages/Contact.js b/pages/Contact.js index cae203b..adca5ed 100644 --- a/pages/Contact.js +++ b/pages/Contact.js @@ -28,19 +28,24 @@ class Contact extends Component { }); const links = []; + const archive = []; await req.firebaseServer .database() .ref('recipients') .once('value') .then(datasnapshot => { datasnapshot.forEach(child => { - links.push(child.key); + if (child.val().archive == true) { + archive.push(child.key); + } else { + links.push(child.key); + } }); }); store.dispatch({ type: types.GET_RECIPIENTS, - payload: links + payload: { links, archive } }); store.dispatch({ @@ -69,13 +74,7 @@ class Contact extends Component { ); } - return ( -