Skip to content

Commit

Permalink
fix search not being able to scroll to bottom due to add bottom tab b…
Browse files Browse the repository at this point in the history
…ar (#5227)
  • Loading branch information
walmat authored Dec 7, 2023
1 parent 383b969 commit d238aee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/navigation/SwipeNavigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const animationConfig = {

const Swipe = createMaterialTopTabNavigator();

const getHeaderHeight = () => {
export const getHeaderHeight = () => {
if (IS_IOS) {
return 82;
}
Expand Down
4 changes: 3 additions & 1 deletion src/screens/discover/components/DiscoverSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import {
getPoapAndOpenSheetWithSecretWord,
} from '@/utils/poaps';
import { navigateToMintCollection } from '@/resources/reservoir/mints';
import { getHeaderHeight } from '@/navigation/SwipeNavigator';

export const SearchContainer = styled(Row)({
height: '100%',
Expand All @@ -61,6 +62,7 @@ export default function DiscoverSearch() {

const { colors } = useTheme();
const profilesEnabled = useExperimentalFlag(PROFILES);
const marginBottom = useMemo(() => getHeaderHeight(), []);

const currencySelectionListRef = useRef();
const [searchQueryForSearch] = useDebounce(searchQuery, 350);
Expand Down Expand Up @@ -277,7 +279,7 @@ export default function DiscoverSearch() {
return (
<View
key={currencyListDataKey}
style={{ height: deviceUtils.dimensions.height - 140 }}
style={{ height: deviceUtils.dimensions.height - 140 - marginBottom }}
>
<SearchContainer>
<CurrencySelectionList
Expand Down

0 comments on commit d238aee

Please sign in to comment.