Skip to content

Commit

Permalink
Merge pull request #2993 from digitalfabrik/2468-reorder-the-icons-in…
Browse files Browse the repository at this point in the history
…-the-header

2468: Reordered header icons in web
  • Loading branch information
janichla authored Nov 29, 2024
2 parents ce168be + dd2ce58 commit 8e2e483
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 28 deletions.
32 changes: 16 additions & 16 deletions native/src/components/DashboardNavigationTiles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,51 +39,51 @@ const DashboardNavigationTiles = ({
const isNewsEnabled = tunewsEnabled || localNewsEnabled
const tiles = []

if (featureFlags.newsStream && isNewsEnabled) {
if (cityModel.poisEnabled && featureFlags.pois) {
tiles.push(
new TileModel({
title: t('news'),
path: 'news',
thumbnail: NewsIcon,
title: t('pois'),
path: 'pois',
thumbnail: POIsIcon,
isExternalUrl: false,
onTilePress: () =>
navigateTo({
route: NEWS_ROUTE,
route: POIS_ROUTE,
cityCode,
languageCode,
newsType: localNewsEnabled ? LOCAL_NEWS_TYPE : TU_NEWS_TYPE,
}),
}),
)
}

if (cityModel.eventsEnabled) {
if (featureFlags.newsStream && isNewsEnabled) {
tiles.push(
new TileModel({
title: t('events'),
path: 'events',
thumbnail: CalendarIcon,
title: t('news'),
path: 'news',
thumbnail: NewsIcon,
isExternalUrl: false,
onTilePress: () =>
navigateTo({
route: EVENTS_ROUTE,
route: NEWS_ROUTE,
cityCode,
languageCode,
newsType: localNewsEnabled ? LOCAL_NEWS_TYPE : TU_NEWS_TYPE,
}),
}),
)
}

if (cityModel.poisEnabled && featureFlags.pois) {
if (cityModel.eventsEnabled) {
tiles.push(
new TileModel({
title: t('pois'),
path: 'pois',
thumbnail: POIsIcon,
title: t('events'),
path: 'events',
thumbnail: CalendarIcon,
isExternalUrl: false,
onTilePress: () =>
navigateTo({
route: POIS_ROUTE,
route: EVENTS_ROUTE,
cityCode,
languageCode,
}),
Expand Down
8 changes: 8 additions & 0 deletions release-notes/unreleased/2468-reorder-the-icons-in-header.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
issue_key: 2468
show_in_stores: true
platforms:
- web
- android
- ios
en: Reordered icons in the header
de: Geänderte Reihenfolge der Icons im Header
24 changes: 12 additions & 12 deletions web/src/components/CityContentHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,18 @@ const CityContentHeader = ({
/>,
]

if (isPoisVisible) {
items.push(
<HeaderNavigationItem
key='locations'
to={poisPath}
active={route === POIS_ROUTE}
text={t('locations')}
icon={POIsIcon}
/>,
)
}

if (isNewsVisible) {
items.push(
<HeaderNavigationItem
Expand All @@ -124,18 +136,6 @@ const CityContentHeader = ({
)
}

if (isPoisVisible) {
items.push(
<HeaderNavigationItem
key='locations'
to={poisPath}
active={route === POIS_ROUTE}
text={t('locations')}
icon={POIsIcon}
/>,
)
}

return items
}

Expand Down

0 comments on commit 8e2e483

Please sign in to comment.