Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2468: Reordered header icons in web #2993

Merged
merged 4 commits into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
Loading