Skip to content

Commit

Permalink
regression: fix Issues with livechat queue (#30400)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinSchoeler authored Sep 18, 2023
1 parent 61a106f commit e554607
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/livechat/src/lib/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ export const normalizeQueueAlert = async (queueInfo) => {
if (!queueInfo) {
return;
}
const formatDistance = await import('date-fns/formatDistance');
const { default: formatDistance } = await import('date-fns/formatDistance');
const { spot, estimatedWaitTimeSeconds } = queueInfo;
const locale = getDateFnsLocale();
const locale = await getDateFnsLocale();
const estimatedWaitTime =
estimatedWaitTimeSeconds && formatDistance(new Date().setSeconds(estimatedWaitTimeSeconds), new Date(), { locale });
return (
Expand Down

0 comments on commit e554607

Please sign in to comment.