Skip to content

Commit

Permalink
M #~: Fix minor to header translates (#1710)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergio Betanzos authored Jan 20, 2022
1 parent 40b957f commit 44e27be
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/fireedge/src/client/components/Header/Group.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { Group as GroupIcon, VerifiedBadge as SelectIcon } from 'iconoir-react'
import { useAuth, useAuthApi } from 'client/features/Auth'
import Search from 'client/components/Search'
import HeaderPopover from 'client/components/Header/Popover'
import { Translate } from 'client/components/HOC'
import { Tr, Translate } from 'client/components/HOC'
import { T, FILTER_POOL } from 'client/constants'

const { ALL_RESOURCES, PRIMARY_GROUP_RESOURCES } = FILTER_POOL
Expand Down Expand Up @@ -73,12 +73,11 @@ const Group = () => {
const sortGroupAsMainFirst = (a, b) =>
a.ID === user?.GUID ? -1 : b.ID === user?.GUID ? 1 : 0

const ShowAllOption = { ID: ALL_RESOURCES, NAME: Tr(T.ShowAll) }

const sortMainGroupFirst = useMemo(
() =>
[{ ID: ALL_RESOURCES, NAME: <Translate word={T.ShowAll} /> }]
?.concat(groups)
?.sort(sortGroupAsMainFirst),
[user?.GUID]
() => [ShowAllOption].concat(groups).sort(sortGroupAsMainFirst),
[user?.GUID, ShowAllOption?.NAME]
)

return (
Expand Down

0 comments on commit 44e27be

Please sign in to comment.