From 5f2d499cc1ee26b64812fb3d32365fe3ae6ac098 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Fri, 8 Dec 2017 18:27:00 +0000 Subject: [PATCH] Add address and birthday. --- src/Contact.tsx | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/Contact.tsx b/src/Contact.tsx index 2018904..8d6d9a4 100644 --- a/src/Contact.tsx +++ b/src/Contact.tsx @@ -1,6 +1,10 @@ import * as React from 'react'; +import * as moment from 'moment'; + import { List, ListItem } from 'material-ui/List'; import Divider from 'material-ui/Divider'; +import IconHome from 'material-ui/svg-icons/action/home'; +import IconDate from 'material-ui/svg-icons/action/date-range'; import CommunicationCall from 'material-ui/svg-icons/communication/call'; import CommunicationChatBubble from 'material-ui/svg-icons/communication/chat-bubble'; import CommunicationEmail from 'material-ui/svg-icons/communication/email'; @@ -73,7 +77,23 @@ class Contact extends React.Component { (x) => (x.substring(x.indexOf(':') + 1)), )); - const skips = ['tel', 'email', 'impp', 'prodid', 'uid', 'fn', 'n', 'version', 'photo']; + lists.push(getAllType( + 'adr', + { + leftIcon: + }, + )); + + lists.push(getAllType( + 'bday', + { + leftIcon: + }, + undefined, + ((x) => moment(x).format('dddd, LL')), + )); + + const skips = ['tel', 'email', 'impp', 'adr', 'bday', 'prodid', 'uid', 'fn', 'n', 'version', 'photo']; const theRest = contact.comp.getAllProperties().filter((prop) => ( skips.indexOf(prop.name) === -1 )).map((prop, idx) => {