Skip to content

Commit

Permalink
fix: issue of CollectionScreen 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 5037224
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/components/collections/CollectionHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ export const CollectionHeader: React.FC<{
<SocialButtonSecondary
text="Explorer"
iconSvg={etherscanSVG}
style={{ marginRight: 12 }}
style={{ marginRight: 12, height: 46 }}
onPress={() => {
const url = contractExplorerLink(
network?.id,
Expand All @@ -261,6 +261,7 @@ export const CollectionHeader: React.FC<{
<SocialButtonSecondary
text="Share"
iconSvg={shareSVG}
style={{ marginRight: 12, height: 46 }}
onPress={onShare}
/>
</View>
Expand Down
11 changes: 10 additions & 1 deletion packages/components/collections/CollectionSocialButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,27 @@ import websiteSVG from "../../../assets/icons/website.svg";
import { CollectionInfo } from "../../utils/collection";
import { SocialButton } from "../buttons/SocialButton";

import { useIsMobile } from "@/hooks/useIsMobile";
import { layout } from "@/utils/style/layout";

export const CollectionSocialButtons: React.FC<{
collectionInfo: CollectionInfo;
hideMintButton?: boolean;
}> = ({ collectionInfo, hideMintButton }) => {
const isMobile = useIsMobile();
const {
discord: discordLink,
twitter: twitterLink,
website: websiteLink,
isMintable,
} = collectionInfo;

const style: ViewStyle = { marginRight: 12, marginVertical: 2 };
const style: ViewStyle = {
marginRight: 12,
marginVertical: isMobile ? layout.spacing_x0_5 : 0,
height: 46,
};

return (
<>
{isMintable && !hideMintButton && (
Expand Down

0 comments on commit 5037224

Please sign in to comment.