Skip to content

Commit

Permalink
regression: fix issues with livechat queue
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinSchoeler committed Sep 14, 2023
1 parent 9b58e80 commit f1fe681
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 f1fe681

Please sign in to comment.