diff --git a/new-lamassu-admin/src/pages/OperatorInfo/SMSNotices/SMSNotices.js b/new-lamassu-admin/src/pages/OperatorInfo/SMSNotices/SMSNotices.js index 4a1bb469..232ad92d 100644 --- a/new-lamassu-admin/src/pages/OperatorInfo/SMSNotices/SMSNotices.js +++ b/new-lamassu-admin/src/pages/OperatorInfo/SMSNotices/SMSNotices.js @@ -1,6 +1,5 @@ import { useQuery, useMutation } from '@apollo/react-hooks' import { makeStyles, Paper } from '@material-ui/core' -import { format } from 'date-fns/fp' import gql from 'graphql-tag' import * as R from 'ramda' import React, { useState } from 'react' @@ -14,6 +13,7 @@ import { ReactComponent as EditIcon } from 'src/styling/icons/action/edit/enable import { ReactComponent as ExpandIconClosed } from 'src/styling/icons/action/expand/closed.svg' import { ReactComponent as ExpandIconOpen } from 'src/styling/icons/action/expand/open.svg' import { ReactComponent as WhiteLogo } from 'src/styling/icons/menu/logo-white.svg' +import { formatDate } from 'src/utils/timezones' import styles from './SMSNotices.styles' import CustomSMSModal from './SMSNoticesModal' @@ -30,6 +30,7 @@ const GET_SMS_NOTICES = gql` enabled allowToggle } + config } ` @@ -85,12 +86,12 @@ const TOOLTIPS = { To edit the contents of the SMS receipt, please go to the 'Receipt' tab`) } -const SMSPreview = ({ sms, coords }) => { +const SMSPreview = ({ sms, coords, timezone }) => { const classes = useStyles(coords) const matches = { '#code': 123, - '#timestamp': format('HH:mm', new Date()) + '#timestamp': formatDate(new Date(), timezone, 'HH:mm') } return ( @@ -108,7 +109,7 @@ const SMSPreview = ({ sms, coords }) => { )}
-