Skip to content

Commit

Permalink
fix(channel-web): don't use full lodash (#12204)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidvitora committed Oct 26, 2022
1 parent 0c9450e commit 5e4ca8a
Showing 1 changed file with 2 additions and 2 deletions.
@@ -1,5 +1,5 @@
import differenceInMinutes from 'date-fns/difference_in_minutes'
import _ from 'lodash'
import last from 'lodash/last'
import { observe } from 'mobx'
import { inject, observer } from 'mobx-react'
import React, { useEffect, useState } from 'react'
Expand Down Expand Up @@ -161,7 +161,7 @@ const Content = observer(props => {
!groups[i - 1] ||
differenceInMinutes(new Date(groupDate), new Date(lastDate)) > constants.TIME_BETWEEN_DATES

const { authorId, payload } = _.last(group)
const { authorId, payload } = last(group)

const avatar = authorId
? props.showUserAvatar && renderAvatar(payload.channel?.web?.userName, payload.channel?.web?.avatarUrl)
Expand Down

0 comments on commit 5e4ca8a

Please sign in to comment.