Skip to content

Commit

Permalink
Merge pull request #113 from Reveille-Rides/bwees/dedup-alerts
Browse files Browse the repository at this point in the history
Dedup alerts from API
  • Loading branch information
bwees authored Jan 31, 2024
2 parents bbb0cfa + 9d4b0e8 commit c981db1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/components/sheets/AlertList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const AlertList: React.FC<SheetProps> = ({ sheetRef }) => {
}, [selectedRoute, alerts]);

return (
<BottomSheetModal ref={sheetRef} snapPoints={snapPoints} >
<BottomSheetModal ref={sheetRef} snapPoints={snapPoints} index={1} >
<BottomSheetView>
{/* header */}
<SheetHeader
Expand All @@ -60,8 +60,8 @@ const AlertList: React.FC<SheetProps> = ({ sheetRef }) => {


<BottomSheetFlatList
data={shownAlerts}
keyExtractor={alert => alert.name}
data={shownAlerts.filter((obj, index, self) => self.findIndex(o => o.name === obj.name) === index)}
keyExtractor={alert => alert.key}
style={{ height: "100%", marginLeft: 16, paddingTop: 8 }}
contentContainerStyle={{ paddingBottom: 35, paddingRight: 16 }}
renderItem={({ item: alert }) => {
Expand Down

0 comments on commit c981db1

Please sign in to comment.