Skip to content

Commit

Permalink
fix: broken padding in create alert screen
Browse files Browse the repository at this point in the history
  • Loading branch information
MounirDhahri committed Nov 23, 2023
1 parent 8d22776 commit 382ae09
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 25 deletions.
46 changes: 21 additions & 25 deletions src/app/Scenes/SavedSearchAlert/Components/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,31 +148,29 @@ export const Form: React.FC<FormProps> = ({
/>
)}

<Join separator={<Spacer y={2} />}>
<Box>
<SavedSearchNameInputQueryRenderer attributes={attributes} />
<Join separator={<Spacer y={4} />}>
<SavedSearchNameInputQueryRenderer attributes={attributes} />

<Box mt={2}>
<Text variant="sm-display">Filters</Text>
<Flex flexDirection="row" flexWrap="wrap" mt={1} mx={-0.5}>
{pills.map((pill, index) => (
<Pill
testID="alert-pill"
m={0.5}
variant="filter"
disabled={isArtistPill(pill)}
key={`filter-label-${index}`}
onPress={() => onRemovePill(pill)}
>
{pill.label}
</Pill>
))}
</Flex>
</Box>
<Box>
<Text variant="sm-display">Filters</Text>
<Flex flexDirection="row" flexWrap="wrap" mt={1} mx={-0.5}>
{pills.map((pill, index) => (
<Pill
testID="alert-pill"
m={0.5}
variant="filter"
disabled={isArtistPill(pill)}
key={`filter-label-${index}`}
onPress={() => onRemovePill(pill)}
>
{pill.label}
</Pill>
))}
</Flex>
</Box>

{!!enableAlertsFilters && !enableAlertsSuggestedFilters ? (
<Flex mt={2}>
<Flex>
<MenuItem
title="Add Filters"
description={
Expand All @@ -189,14 +187,12 @@ export const Form: React.FC<FormProps> = ({
) : null}

{enableAlertsFilters && enableAlertsSuggestedFilters ? (
<Flex mt={2}>
<SavedSearchSuggestedFiltersQueryRenderer />
</Flex>
<SavedSearchSuggestedFiltersQueryRenderer />
) : null}

{/* Price range is part of the new filters screen, no need to show it here anymore */}
{!enableAlertsFilters && (
<Flex my={1}>
<Flex>
<Touchable
accessibilityLabel="Set price range"
accessibilityRole="button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export const SavedSearchSuggestedFilters: React.FC<{}> = () => {
navigation.navigate("SavedSearchFilterScreen")
}}
px={0}
py={0}
/>
)
}
Expand Down

0 comments on commit 382ae09

Please sign in to comment.