diff --git a/src/views/dashboard/index.tsx b/src/views/dashboard/index.tsx index ccfe237..6007f5c 100644 --- a/src/views/dashboard/index.tsx +++ b/src/views/dashboard/index.tsx @@ -46,12 +46,7 @@ const activityTypeColorMap: Record = { deal: '#722ed1', } -const activityTypeLabelMap: Record = { - call: 'Call', - email: 'Email', - note: 'Note', - deal: 'Deal', -} + const formatRelativeTime = (timestamp: string): string => { const now = new Date() @@ -234,93 +229,56 @@ const DashboardPage = () => { - - View All - - } - styles={{ body: { padding: '8px 24px 24px 24px' } }} - > + { - const customerName = getCustomerName(activity.customerId) - const relativeTime = formatRelativeTime(activity.timestamp) - - return ( - - - } - title={ - - - {activity.summary} - - - {activity.statusAfter && ( - - {statusLabelMap[activity.statusAfter]} - - )} - - {activityTypeLabelMap[activity.type]} - - - - } - description={ - - - - {activity.actor} - - · - ( + + + } + title={ + + {activity.summary} + {activity.statusAfter && ( + - {customerName} - - · - - - {relativeTime} - - - } - /> - - ) - }} + {statusLabelMap[activity.statusAfter]} + + )} + + } + description={ + + {activity.actor} + · + + {getCustomerName(activity.customerId)} + + · + {formatRelativeTime(activity.timestamp)} + + } + /> + + )} /> - + { }, ]} renderItem={item => ( - + {item.icon} } - title={ - - {item.title} - - } - description={ - - {item.description} - - } + title={{item.title}} + description={{item.description}} /> )}