Skip to content

Commit

Permalink
feat: home banners
Browse files Browse the repository at this point in the history
  • Loading branch information
Sofia Cantero committed Dec 3, 2024
1 parent 5248a59 commit a3f13b2
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 3 deletions.
Binary file added assets/credit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/crypto.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/fedex-ad.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions assets/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ const images = {
filterIcon: () => require('./filter_list.png'),
trashIcon: () => require('./trash.png'),
plusIcon: () => require('./plus.png'),
fedexBanner: () => require('./fedex-ad.png'),
productsBanner: () => require('./products-banner.png'),
creditCard: () => require('./credit.png'),
paypal: () => require('./paypal.png'),
crypto: () => require('./crypto.png'),
};

export type Images = keyof typeof images;
Expand Down
Binary file added assets/paypal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/products-banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 28 additions & 3 deletions src/app/(app)/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,37 @@
import images from 'assets';

import { HeaderLogo } from '@/components/header-logo';
import { HorizontalCarousel } from '@/components/home/carousel';
import { SafeAreaView } from '@/ui';
import PaymentMethods from '@/components/home/payment-methods';
import { Image, SafeAreaView, ScrollView, Text, View } from '@/ui';

export default function Feed() {
return (
<SafeAreaView>
<SafeAreaView className="bg-light_background">
<HeaderLogo />
<HorizontalCarousel />
<ScrollView>
<HorizontalCarousel />
<View className="h-52">
<Image
className="w-full flex-1"
source={images.productsBanner()}
contentFit="contain"
/>
</View>
<View className="bg-white">
<Text className="my-8 self-center text-lg font-bold">
Payment methods
</Text>
<PaymentMethods />
</View>
<View className="h-48">
<Image
className="w-full flex-1"
source={images.fedexBanner()}
contentFit="contain"
/>
</View>
</ScrollView>
</SafeAreaView>
);
}
38 changes: 38 additions & 0 deletions src/components/home/payment-methods.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import images from 'assets';

import { Image, Text, TouchableOpacity, View } from '@/ui';

const PaymentMethods = () => {
return (
<View className="my-4 h-20 w-4/5 flex-row items-center justify-evenly self-center">
<TouchableOpacity className="mx-3 items-center justify-items-center">
<Image
source={images.creditCard()}
className="mb-6 h-9 w-9"
contentFit="contain"
/>
<Text>Credit</Text>
</TouchableOpacity>
<View className="mx-5 h-full w-px bg-black" />
<TouchableOpacity className="mx-3 items-center justify-items-center">
<Image
source={images.paypal()}
className="mb-6 h-9 w-9"
contentFit="contain"
/>
<Text>Paypal</Text>
</TouchableOpacity>
<View className="mx-5 h-full w-px bg-black" />
<TouchableOpacity className="mx-3 items-center justify-items-center">
<Image
source={images.crypto()}
className="mb-6 h-9 w-9"
contentFit="contain"
/>
<Text>Crypto</Text>
</TouchableOpacity>
</View>
);
};

export default PaymentMethods;

0 comments on commit a3f13b2

Please sign in to comment.