Use ISO-8601 date format for last active time (#8306)

The last active time for each account in the Connected Sites list was
formatted as `yyyy-M-d` (i.e. without the zero-padding for the month
and the day). This didn't match the designs, isn't compliant with
ISO-8601, and generally isn't a common date format.

The month and day are now zero-padded.
feature/default_network_editable
Mark Stacey 5 years ago committed by GitHub
parent 55228ef08c
commit 5b64a3d75e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      ui/app/pages/permissions-connect/permissions-connect.container.js
  2. 2
      ui/app/selectors/selectors.js

@ -36,7 +36,7 @@ const mapStateToProps = (state, ownProps) => {
const addressLastConnectedMap = lastConnectedInfo[origin] || {} const addressLastConnectedMap = lastConnectedInfo[origin] || {}
Object.keys(addressLastConnectedMap).forEach((key) => { Object.keys(addressLastConnectedMap).forEach((key) => {
addressLastConnectedMap[key] = formatDate(addressLastConnectedMap[key], 'yyyy-M-d') addressLastConnectedMap[key] = formatDate(addressLastConnectedMap[key], 'yyyy-MM-dd')
}) })
const connectPath = `${CONNECT_ROUTE}/${permissionsRequestId}` const connectPath = `${CONNECT_ROUTE}/${permissionsRequestId}`

@ -498,7 +498,7 @@ export function getRenderablePermissionsDomains (state) {
const selectedAddressLastConnectedTime = accountsLastConnectedTime[selectedAddress] const selectedAddressLastConnectedTime = accountsLastConnectedTime[selectedAddress]
const lastConnectedTime = selectedAddressLastConnectedTime const lastConnectedTime = selectedAddressLastConnectedTime
? formatDate(selectedAddressLastConnectedTime, 'yyyy-M-d') ? formatDate(selectedAddressLastConnectedTime, 'yyyy-MM-dd')
: '' : ''
return [ ...acc, { return [ ...acc, {

Loading…
Cancel
Save