Skip to content

Commit

Permalink
Fix stream sort options
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasgwatson committed May 12, 2023
1 parent 68e0867 commit 2303b2c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/components/StreamViewControls/StreamViewControls.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const makeDropdown = (selected, options, onChange) => {
toggleChildren={
<span styleName='dropdown-label'>
<Icon name='ArrowDown' />
{options.find(o => o.id === selected).label}
{t(options.find(o => o.id === selected).label)}
</span>
}
items={options.map(({ id, label }) => ({
Expand All @@ -30,13 +30,13 @@ const makeDropdown = (selected, options, onChange) => {
const StreamViewControls = (props) => {
const { t } = useTranslation()
const POST_TYPE_OPTIONS = [
{ id: undefined, label: t('All Posts') },
{ id: 'discussion', label: t('Discussions') },
{ id: 'event', label: t('Events') },
{ id: 'offer', label: t('Offers') },
{ id: 'project', label: t('Projects') },
{ id: 'request', label: t('Requests') },
{ id: 'resource', label: t('Resources') }
{ id: undefined, label: 'All Posts' },
{ id: 'discussion', label: 'Discussions' },
{ id: 'event', label: 'Events' },
{ id: 'offer', label: 'Offers' },
{ id: 'project', label: 'Projects' },
{ id: 'request', label: 'Requests' },
{ id: 'resource', label: 'Resources' }
]

const { customViewType, sortBy, postTypeFilter, viewMode, changeSearch, changeSort, changeTab, changeView, context, searchValue, view, customPostTypes, changeChildPostInclusion, childPostInclusion } = props
Expand Down

0 comments on commit 2303b2c

Please sign in to comment.