Skip to content

Commit

Permalink
fix: marketplace ui break in mobile view
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiragPansuriya-iView committed Apr 18, 2024
1 parent 49e1a6d commit b10f749
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
9 changes: 8 additions & 1 deletion packages/components/sorts/SearchInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@ import { layout } from "../../utils/style/layout";
import { SVG } from "../SVG";
import { LegacyTertiaryBox } from "../boxes/LegacyTertiaryBox";

import { useIsMobile } from "@/hooks/useIsMobile";

export const SearchInput: React.FC<{
style?: StyleProp<ViewStyle>;
borderRadius?: number;
handleChangeText?: (e: string) => void;
}> = ({ handleChangeText, borderRadius, style }) => {
const isMobile = useIsMobile();
return (
<LegacyTertiaryBox
style={style}
Expand All @@ -31,7 +34,11 @@ export const SearchInput: React.FC<{
fullWidth
>
<SVG
style={{ marginRight: layout.spacing_x1, maxWidth: 22 }}
style={{
marginRight: layout.spacing_x1,
maxWidth: 22,
marginLeft: isMobile ? layout.spacing_x2 : 0,
}}
source={searchSVG}
/>
<TextInput
Expand Down
10 changes: 8 additions & 2 deletions packages/screens/Marketplace/MarketplaceScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,11 @@ const PrettyPriceWithCurrency: React.FC<{
style={[
isMobile ? fontSemibold9 : fontSemibold11,
{
marginLeft: layout.spacing_x1,
marginLeft: isMobile
? layout.spacing_x0_5
: layout.spacing_x1,
color: neutral77,
width: isMobile ? layout.spacing_x3 : "auto",
},
]}
numberOfLines={1}
Expand Down Expand Up @@ -418,12 +421,15 @@ const CollectionRow: React.FC<{
</View>
<PrettyPriceWithCurrency
data={rowData["tradeVolume"]}
style={{ flex: TABLE_COLUMNS.tradeVolume.flex }}
style={{
flex: TABLE_COLUMNS.tradeVolume.flex,
}}
/>
<InnerCell
style={{ flex: TABLE_COLUMNS.tradeVolumeDiff.flex }}
textStyle={{
color: tradeDiffColor,
marginLeft: isMobile ? layout.spacing_x1_5 : 0,
}}
>
{tradeDiffText}
Expand Down

0 comments on commit b10f749

Please sign in to comment.