attempt at temp mitigatiion of overflowing navigation title

This commit is contained in:
leander committed 2024-08-09 01:15:32 +02:00
1 parent cbc559acdc
commit 6ac1b8f08f
1 file changed
+7 -1
+7 -1
View File
@@ -38,7 +38,13 @@ const EventStackScreen = () => (
<EventStack.Screen
name="EventDetail"
component={EventDetail}
options={({ route }) => ({ title: route.params.event.title.decoded })}
options={({ route }) => ({
// TODO: make this not suck
title:
route.params.event.title.decoded.length < 40
? route.params.event.title.decoded
: route.params.event.title.decoded.substring(0, 30) + '...',
})}
/>
</EventStack.Navigator>
);