0% found this document useful (0 votes)
1 views22 pages

Grenoo Source Code

This document provides a comprehensive guide for setting up and developing an Expo app named 'Grenoo'. It includes instructions for installing dependencies, starting the app, and resources for learning more about Expo, along with configuration files for the project. The app features a layout with authentication screens for signing in and signing up, utilizing various Expo and React Native components.

Uploaded by

mahtiinay
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views22 pages

Grenoo Source Code

This document provides a comprehensive guide for setting up and developing an Expo app named 'Grenoo'. It includes instructions for installing dependencies, starting the app, and resources for learning more about Expo, along with configuration files for the project. The app features a layout with authentication screens for signing in and signing up, utilizing various Expo and React Native components.

Uploaded by

mahtiinay
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

================================================

FILE: [Link]
================================================
# Welcome to your Expo app

This is an [Expo]([Link] project created with [`create-expo-


app`]([Link]

## Get started

1. Install dependencies

```bash
npm install
```

2. Start the app

```bash
npx expo start
```

In the output, you'll find options to open the app in a

- [development build]([Link]
- [Android emulator]([Link]
- [iOS simulator]([Link]
- [Expo Go]([Link] a limited sandbox for trying out app development with
Expo

You can start developing by editing the files inside the **app** directory. This project uses
[file-based routing]([Link]

## Get a fresh project

When you're ready, run:

```bash
npm run reset-project
```

This command will move the starter code to the **app-example** directory and create a
blank **app** directory where you can start developing.

## Learn more

To learn more about developing your project with Expo, look at the following resources:
- [Expo documentation]([Link] Learn fundamentals, or go into advanced
topics with our [guides]([Link]
- [Learn Expo tutorial]([Link] Follow a step-by-step
tutorial where you'll create a project that runs on Android, iOS, and the web.

## Join the community

Join our community of developers creating universal apps.

- [Expo on GitHub]([Link] View our open source platform and


contribute.
- [Discord community]([Link] Chat with Expo users and ask questions.

================================================
FILE: [Link]
================================================
{
"expo": {
"name": "Grenoo",
"slug": "Grenoo",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/images/[Link]",
"scheme": "grenoo",
"userInterfaceStyle": "automatic",
"newArchEnabled": true,
"ios": {
"supportsTablet": true
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/images/[Link]",
"backgroundColor": "#ffffff"
},
"edgeToEdgeEnabled": true,
"package": "com.prashanttt_214.Grenoo"
},
"web": {
"bundler": "metro",
"output": "static",
"favicon": "./assets/images/[Link]"
},
"plugins": [
"expo-router",
[
"expo-splash-screen",
{
"image": "./assets/images/[Link]",
"imageWidth": 200,
"resizeMode": "contain",
"backgroundColor": "#ffffff"
}
]
],
"experiments": {
"typedRoutes": true
}
}
}

================================================
FILE: [Link]
================================================
[Link] = function (api) {
[Link](true);
return {
presets: [
["babel-preset-expo", { jsxImportSource: "nativewind" }],
"nativewind/babel",
],
};
};

================================================
FILE: [Link]
================================================
// [Link]
const { defineConfig } = require('eslint/config');
const expoConfig = require('eslint-config-expo/flat');

[Link] = defineConfig([
expoConfig,
{
ignores: ['dist/*'],
},
]);
================================================
FILE: [Link]
================================================
const { getDefaultConfig } = require("expo/metro-config");
const { withNativeWind } = require('nativewind/metro');

const config = getDefaultConfig(__dirname)

[Link] = withNativeWind(config, { input: './app/[Link]' })

================================================
FILE: [Link]
================================================
/// <reference types="nativewind/types" />

================================================
FILE: [Link]
================================================
{
"name": "grenoo",
"main": "expo-router/entry",
"version": "1.0.0",
"scripts": {
"start": "expo start",
"reset-project": "node ./scripts/[Link]",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web",
"lint": "expo lint"
},
"dependencies": {
"@clerk/clerk-expo": "^2.14.28",
"@expo/vector-icons": "^14.1.0",
"@react-navigation/bottom-tabs": "^7.3.10",
"@react-navigation/elements": "^2.3.8",
"@react-navigation/native": "^7.1.6",
"expo": "~53.0.22",
"expo-blur": "~14.1.5",
"expo-constants": "~17.1.7",
"expo-dev-client": "~5.2.4",
"expo-font": "~13.3.2",
"expo-haptics": "~14.1.4",
"expo-image": "~2.4.0",
"expo-linear-gradient": "^14.1.5",
"expo-linking": "~7.1.7",
"expo-router": "~5.1.5",
"expo-splash-screen": "~0.30.10",
"expo-status-bar": "~2.2.3",
"expo-symbols": "~0.4.5",
"expo-system-ui": "~5.0.11",
"expo-web-browser": "~14.2.0",
"firebase": "^12.2.1",
"formik": "^2.4.6",
"lucide-react": "^0.542.0",
"nativewind": "^4.1.23",
"prettier-plugin-tailwindcss": "^0.5.14",
"react": "19.0.0",
"react-dom": "19.0.0",
"react-native": "0.79.6",
"react-native-gesture-handler": "~2.24.0",
"react-native-reanimated": "~3.17.4",
"react-native-safe-area-context": "^5.4.0",
"react-native-screens": "~4.11.1",
"react-native-web": "~0.20.0",
"react-native-webview": "13.13.5",
"tailwindcss": "^3.4.17",
"yup": "^1.7.0"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@types/react": "~19.0.10",
"eslint": "^9.25.0",
"eslint-config-expo": "~9.2.0",
"typescript": "~5.8.3"
},
"private": true
}

================================================
FILE: [Link]
================================================
/** @type {import('tailwindcss').Config} */
[Link] = {
// NOTE: Update this to include the paths to all files that contain Nativewind classes.
content: ["./app/**/*.{js,jsx,ts,tsx}", "./components/**/*.{js,jsx,ts,tsx}"],
presets: [require("nativewind/preset")],
theme: {
extend: {},
},
plugins: [],
}

================================================
FILE: [Link]
================================================
{
"extends": "expo/[Link]",
"compilerOptions": {
"strict": true,
"paths": {
"@/*": [
"./*"
]
}
},
"include": [
"**/*.ts",
"**/*.tsx",
".expo/types/**/*.ts",
"[Link]",
"[Link]"
]
}

================================================
FILE: app/_layout.tsx
================================================
import { Stack } from "expo-router";
import "./[Link]";

export default function RootLayout() {


return (
<Stack screenOptions={{ headerShown: false }}>
<[Link] name="index" />
<[Link] name="(tabs)" />
</Stack>
);
}

================================================
FILE: app/[Link]
================================================
@tailwind base;
@tailwind components;
@tailwind utilities;

================================================
FILE: app/[Link]
================================================
import { LinearGradient } from "expo-linear-gradient";
import { useRouter } from "expo-router";
import { ImageBackground, StatusBar, Text, TouchableOpacity, View } from "react-native";
import { SafeAreaView } from "react-native-safe-area-context";

export default function Index() {


const router = useRouter();

return (
<View className="flex-1 bg-[#2E481E]">
<StatusBar barStyle="light-content" backgroundColor="#2E481E" />
<SafeAreaView className="flex-1">
<LinearGradient
colors={["#2E481E", "#1B2D12"]}
style={{ flex: 1 }}
>
<ImageBackground
source={require("../assets/images/[Link]")}
className="flex-1 flex justify-end h-60 w-full"
resizeMode="cover"
>
<View className="bg-[#2E481E] rounded-t-[50px] rounded-tr-0 py-10 px-10">
{/* Logo Image */}
<View className="items-center mb-4">
<ImageBackground
source={require("../assets/images/[Link]")}
style={{ width: 100, height: 100 }}
resizeMode="contain"
/>
</View>
<Text className="text-white text-3xl font-extrabold text-center mb-2">
Welcome to <Text style={{ color: "#9acd6c" }}>AgriMitra</Text>
</Text>
<Text className="text-[#d0d0d0] text-base text-center mb-6">
Grow with us — Sign in or create a new account
</Text>

<TouchableOpacity
onPress={() => [Link]("/home")}
className="bg-[#4CAF50] rounded-xl py-4 items-center mb-4"
>
<Text style={{ color: "white", fontWeight: "700", fontSize: 18 }}>
Home
</Text>
</TouchableOpacity>
<TouchableOpacity
onPress={() => [Link]("/signin")}
className="bg-[#4CAF50] rounded-xl py-4 items-center mb-4"
>
<Text style={{ color: "white", fontWeight: "700", fontSize: 18 }}>
Sign In
</Text>
</TouchableOpacity>
<TouchableOpacity
onPress={() => [Link]("/signup")}
className="border border-[#4CAF50] rounded-xl py-4 items-center"
>
<Text style={{ color: "#4CAF50", fontWeight: "700", fontSize: 18 }}>
Create an Account
</Text>
</TouchableOpacity>
</View>
</ImageBackground>
</LinearGradient>
</SafeAreaView>
</View>
);
}

================================================
FILE: app/(auth)/[Link]
================================================
import { validationSchema } from "@/utils/authSchema";
import { LinearGradient } from "expo-linear-gradient";
import { useRouter } from "expo-router";
import { Formik } from "formik";
import React from "react";
import {
ImageBackground,
SafeAreaView,
Text,
TextInput,
TouchableOpacity,
View
} from "react-native";

const Signin = () => {


const router = useRouter();
const handleSignin = () => {

};

return (
<SafeAreaView className="flex-1 bg-[#E8F5E9]">
{/* Background image */}
<ImageBackground
source={require("../../assets/images/[Link]")}
resizeMode="cover"
className="h-72 w-full"
>
<LinearGradient
colors={["rgba(0,0,0,0.6)", "transparent"]}
className="h-full w-full"
/>
</ImageBackground>

{/* Form Container */}


<View className="flex-1 -mt-20 bg-white rounded-t-[50px] px-10 pt-8 shadow-lg">
{/* Header */}
<View className="mb-10 items-center">
<ImageBackground
source={require("../../assets/images/[Link]")}
style={{ width: 100, height: 100 }}
resizeMode="contain"
className="mb-4"
/>
<Text className="text-4xl font-extrabold text-center text-[#2E481E]">
Welcome back{" "}
</Text>
<Text className="text-gray-500 text-center mt-2 text-base">
Let&apos;s get started with new account{" "}
</Text>
</View>

<Formik
initialValues={{ name: '', email: '', password: '' }}
validationSchema={validationSchema}
onSubmit={handleSignin}
>
{({ handleChange, handleBlur, handleSubmit, values, errors, touched }) => (
<View className="w-full">
<Text className="text-[#142C14] text-base mb-1 font-bold">Name</Text>
<TextInput
onChangeText={handleChange("name")}
onBlur={handleBlur("name")}
className="h-12 border border-gray-300 rounded-lg px-3 mb-1"
value={[Link]}
/>

{[Link] && [Link] &&


(<Text className="text-red-500 text-xs mb-2">
{[Link]}
</Text>
)
}
<Text className="text-[#142C14] text-base mb-1 font-bold">Email</Text>
<TextInput
keyboardType="email-address"
onChangeText={handleChange("email")}
onBlur={handleBlur("email")}
className="h-12 border border-gray-300 rounded-lg px-3 mb-1"
value={[Link]}
/>

{[Link] && [Link] &&


(<Text className="text-red-500 text-xs mb-2">
{[Link]}
</Text>
)
}
<Text className="text-[#142C14] text-base mb-1 font-
bold">Password</Text>
<TextInput
onChangeText={handleChange("password")}
secureTextEntry
onBlur={handleBlur("password")}
className="h-12 border border-gray-300 rounded-lg px-3 mb-1"
value={[Link]}
/>

{[Link] && [Link] &&


(<Text className="text-red-500 text-xs">
{[Link]}
</Text>
)
}
<TouchableOpacity
className="w-full h-14 rounded-full bg-black justify-center items-center
shadow-md mt-8"
onPress={() => handleSubmit()}
>
<Text className="text-white font-semibold text-xl">Sign Up</Text>
</TouchableOpacity>
</View>
)}
</Formik>
<View className="mt-2 flex-row justify-center">
<Text className="text-gray-600 text-base">
New to Agrimitra?{" "}
</Text>
<TouchableOpacity
onPress={() => [Link]("/signup")}
>
<Text className="text-[#2E481E] font-semibold text-base border-b-2 border-
[#2E481E]">
Join us now
</Text>
</TouchableOpacity>
</View>
</View>
</SafeAreaView>
)
}

export default Signin

================================================
FILE: app/(auth)/[Link]
================================================
import { validationSchema } from "@/utils/authSchema";
import { LinearGradient } from "expo-linear-gradient";
import { useRouter } from "expo-router";
import { Formik } from "formik";
import React from "react";
import {
ImageBackground,
SafeAreaView,
Text,
TextInput,
TouchableOpacity,
View
} from "react-native";

const Signup = () => {


const router = useRouter();
const handleSignup = () => {

};

return (
<SafeAreaView className="flex-1 bg-[#E8F5E9]">
{/* Background image */}
<ImageBackground
source={require("../../assets/images/[Link]")}
resizeMode="cover"
className="h-72 w-full"
>
<LinearGradient
colors={["rgba(0,0,0,0.6)", "transparent"]}
className="h-full w-full"
/>
</ImageBackground>

{/* Form Container */}


<View className="flex-1 -mt-20 bg-white rounded-t-[50px] px-10 pt-12 shadow-lg">
{/* Header */}
<View className="mb-10 items-center">
<ImageBackground
source={require("../../assets/images/[Link]")}
style={{ width: 100, height: 100 }}
resizeMode="contain"
className="mb-4"
/>
<Text className="text-4xl font-extrabold text-center text-[#2E481E]">
Create an Account{" "}
</Text>
<Text className="text-gray-500 text-center mt-2 text-base">
Let&apos;s get started with new account{" "}
</Text>
</View>

<Formik
initialValues={{ email: '', password: '' }}
validationSchema={validationSchema}
onSubmit={handleSignup}
>
{({ handleChange, handleBlur, handleSubmit, values, errors, touched }) => (
<View className="w-full">
<Text className="text-[#142C14] text-base mb-1 font-bold">Email</Text>
<TextInput
keyboardType="email-address"
onChangeText={handleChange("email")}
onBlur={handleBlur("email")}
className="h-12 border border-gray-300 rounded-lg px-3 mb-1"
value={[Link]}
/>

{[Link] && [Link] &&


(<Text className="text-red-500 text-xs mb-2">
{[Link]}
</Text>
)
}
<Text className="text-[#142C14] text-base mb-1 font-
bold">Password</Text>
<TextInput
onChangeText={handleChange("password")}
secureTextEntry
onBlur={handleBlur("password")}
className="h-12 border border-gray-300 rounded-lg px-3 mb-1"
value={[Link]}
/>

{[Link] && [Link] &&


(<Text className="text-red-500 text-xs mb-2">
{[Link]}
</Text>
)
}

<TouchableOpacity
className="w-full h-14 rounded-full bg-black justify-center items-center
shadow-md mt-8"
onPress={() => handleSubmit()}
>
<Text className="text-white font-semibold text-xl">Sign Up</Text>
</TouchableOpacity>
</View>
)}
</Formik>
<View className="mt-2 flex-row justify-center">
<Text className="text-gray-600 text-base">
Already have an account?{" "}
</Text>
<TouchableOpacity
onPress={() => [Link]("/signin")}
>
<Text className="text-[#2E481E] font-semibold text-base border-b-2 border-
[#2E481E]">
Sign in
</Text>
</TouchableOpacity>
</View>
</View>
</SafeAreaView>
);
};

export default Signup;

================================================
FILE: app/(tabs)/_layout.tsx
================================================
import { Colors } from '@/assets/Colors';
import Entypo from '@expo/vector-icons/Entypo';
import Ionicons from '@expo/vector-icons/Ionicons';
import { Tabs } from 'expo-router';
import React from 'react';

const TabLayout = () => {


return (
<Tabs screenOptions={{
headerShown: false, tabBarActiveTintColor: [Link],
tabBarInactiveBackgroundColor: [Link],
tabBarStyle: {
backgroundColor: '#fff',
paddingBottom: 14,
height: 75,
},
tabBarLabelStyle: {
fontSize: 12,
fontWeight: 'bold'
}
}}>
<[Link] name='home' options={{
title: "Home",
tabBarIcon: ({ color }) => (
<Entypo name="home" size={24} color={color} />
)
}} />
<[Link] name='categories' options={{
title: "Categories",
tabBarIcon: ({ color }) => (
<Ionicons name="grid" size={24} color={color} />
)
}} />
<[Link] name='cart' options={{
title: "Cart",
tabBarIcon: ({ color }) => (
<Ionicons name="cart" size={24} color={color} />
)
}} />
<[Link] name='profile' options={{
title: "Profile",
tabBarIcon: ({ color }) => (
<Ionicons name="person" size={24} color={color} />
)
}} />
</Tabs>
)
}

export default TabLayout;

================================================
FILE: app/(tabs)/[Link]
================================================
import React from 'react'
import { Text, View } from 'react-native'

const cart = () => {


return (
<View>
<Text>cart</Text>
</View>
)
}

export default cart

================================================
FILE: app/(tabs)/[Link]
================================================
import React from 'react'
import { Text, View } from 'react-native'
const categories = () => {
return (
<View>
<Text>categories</Text>
</View>
)
}

export default categories

================================================
FILE: app/(tabs)/[Link]
================================================
import { Homeproducts } from "@/constants/homeProduct";
import Ionicons from "@expo/vector-icons/Ionicons";
import { router } from "expo-router";
import { FlatList, Image, Pressable, ScrollView, StatusBar, Text, TouchableOpacity, View } from
"react-native";
import { SafeAreaView } from "react-native-safe-area-context";

export default function Home() {


return (
<SafeAreaView className="flex-1 bg-white">
<StatusBar barStyle="light-content" backgroundColor="#2D5128" />
<View className="border-b border-2 border-[#2D5128]/20 bg-[#2D5128]">
<View className="px-6">
{/* Header */}
<View className="flex-row justify-between items-center mt-4">
<Pressable onPress={() => [Link]('/profile')} className=" rounded-full bg-
[#E4EB9C] justify-center items-center">
<Ionicons name="person-circle" size={40} color="#142C14" />
</Pressable>
<View className="flex-row space-x-3 gap-1">
<Pressable className="w-10 h-10 rounded-full bg-[#E4EB9C] justify-center items-
center">
<Ionicons name="notifications-outline" size={22} color="#142C14" />
</Pressable>
<Pressable className="w-10 h-10 rounded-full bg-[#E4EB9C] justify-center items-
center">
<Ionicons name="sunny-outline" size={22} color="#142C14" />
</Pressable>
</View>
</View>
{/* Greeting */}
<View className="mt-6">
<Text className="text-2xl font-extrabold text-[#E4EB9C]">
Welcome to AgriMitra
</Text>
<Text className="text-2xl font-extrabold text-[#8DA750]">
Buy & Sell Fresh Farm Produce
</Text>
</View>

{/* Featured Plant Card */}


<View className="mt-6">
<View className="bg-[#E4EB9C] rounded-3xl overflow-hidden">
<Image
source={require("../../assets/images/[Link]")}
className="w-full h-44"
resizeMode="cover"
style={{ width: '100%', height: 170 }}
/>
<View className="absolute right-4 top-4 bg-white rounded-2xl px-3 py-3 shadow-
md mb-3">
<Text className="font-bold text-[#2D5128]">Wheat Seeds</Text>
<Text className="text-gray-500 text-xs">By Shree Farm Co.</Text>
<View className="h-[1px] bg-gray-200 my-2" />
<Text className="text-sm font-semibold text-[#537B2F]">₹120/kg</Text>
<Text className="text-xs text-gray-500">150kg left</Text>

<TouchableOpacity className="p-2 rounded-full bg-[#142C14] items-center mt-1">


<Ionicons name="cart-outline" size={18} color="#fff" />
</TouchableOpacity>
</View>
</View>
</View>
</View>

{/* Categories */}


<View className="mt-2 px-3">
<ScrollView horizontal showsHorizontalScrollIndicator={false} className="mt-5 mb-
4">
{["Crops", "Fruits", "Vegetables", "Dairy", "Seeds"].map((cat, i) => (
<TouchableOpacity
key={i}
className="bg-[#8DA750] px-4 py-2 rounded-full mr-2"
>
<Text className="text-[#142C14] font-semibold">{cat}</Text>
</TouchableOpacity>
))}
</ScrollView>
</View>
</View>

{/* Product Grid */}


<View className="flex-1 px-2">
<FlatList
data={Homeproducts}
keyExtractor={(item) => [Link]}
numColumns={2}
showsVerticalScrollIndicator={false}
columnWrapperStyle={{ justifyContent: "space-between" }}
contentContainerStyle={{ padding: 16 }}
renderItem={({ item }) => (
<View className="w-[48%] bg-gray-100 rounded-2xl p-3 mb-4">
<Image
source={[Link]}
className="w-full h-24 rounded-lg"
resizeMode="cover"
style={{ width: '100%', height: 96 }}
/>
<Text className="font-semibold mt-2">{[Link]}</Text>
<Text className="text-green-600">{[Link]}</Text>
<Text className="text-gray-400 text-sm">{[Link]}</Text>
</View>
)}
/>
</View>
</SafeAreaView>
);
}

================================================
FILE: app/(tabs)/[Link]
================================================
import React from 'react'
import { Text, View } from 'react-native'

const profile = () => {


return (
<View>
<Text>profile</Text>
</View>
)
}
export default profile

================================================
FILE: assets/[Link]
================================================
const tintColorLight = "#0a7ea4";
const tintColorDark = "#fff";
const primary = "#537B2F";
const secondary = "#8DA750";
export const Colors = {
light: {
text: "#11181C",
background: "#fff",
tint: tintColorLight,
icon: "#687076",
tabIconDefault: "#687076",
tabIconSelected: tintColorLight,
},
dark: {
text: "#ecedee",
background: "#151718",
tint: tintColorDark,
icon: "#9BA1A6",
tabIconDefault: "#9ba1a6",
tabIconSelected: tintColorDark,
},
PRIMARY: primary,
SECONDARY: secondary,
BACKGROUND: "#E4EB9C", // Mindaro (light background)
DARK: "#142C14", // Dark Green
CALPOLY: "#2D5128", // Cal Poly Green
TEXT: "#2D5128", // dark readable text
};

================================================
FILE: config/[Link]
================================================
import { Homeproducts } from "@/constants/homeProduct";
import { collection, doc, setDoc } from "firebase/firestore";
import { db } from "./firebaseConfig";

const homeData = Homeproducts;


export const uploadData = async () => {
try {
for (let i = 0; i < [Link]; i++) {
const product = homeData[i];
const docRef = doc(collection(db, "homeProducts"),`product${i+1}`);
await setDoc(docRef, product);
}
[Link]("Data uploaded successfully");
}catch (error) {
[Link]("Error uploading data: ", error);
}
};

================================================
FILE: config/[Link]
================================================
// Import the functions you need from the SDKs you need
import { initializeApp } from "firebase/app";
import { getFirestore } from "firebase/firestore";
// TODO: Add SDKs for Firebase products that you want to use
// [Link]

// Your web app's Firebase configuration


// For Firebase JS SDK v7.20.0 and later, measurementId is optional
const firebaseConfig = {
apiKey: [Link].NEXT_PUBLIC_FIREBASE_API_KEY,
authDomain: [Link].NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN,
projectId: [Link].NEXT_PUBLIC_FIREBASE_PROJECT_ID,
storageBucket: [Link].NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET,
messagingSenderId: [Link].NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID,
appId: [Link].NEXT_PUBLIC_FIREBASE_APP_ID,
measurementId: [Link].NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID
};

// Initialize Firebase
export const app = initializeApp(firebaseConfig);
export const db = getFirestore(app);

================================================
FILE: constants/[Link]
================================================
export const Homeproducts = [
{
id: "1",
name: "Organic Tomato",
price: "₹30/kg",
farmer: "Farmer Prashant",
image: require("../assets/images/[Link]"),
},
{
id: "2",
name: "Fresh Onions",
price: "₹40/kg",
farmer: "Farmer Vaibhav",
image: require("../assets/images/[Link]"),
},
{
id: "3",
name: "Pure Milk",
price: "₹55/litre",
farmer: "Farmer Ramesh",
image: require("../assets/images/[Link]"),
},
{
id: "4",
name: "Mango Alphonso",
price: "₹150/dozen",
farmer: "Farmer Shree",
image: require("../assets/images/[Link]"),
},
{
id: "5",
name: "Fresh Potatoes",
price: "₹50/kg",
farmer: "Farmer abhishek",
image: {
uri: "[Link]
},
},
];

export type HomeProductType = {


id: string; // IDs are strings in your array
name: string;
price: string; // all your prices are strings like "₹30/kg"
farmer: string;
image: number | { uri: string }; // local require() = number, URL = {uri: string}
};

================================================
FILE: utils/[Link]
================================================
import * as Yup from "yup";

export const validationSchema = [Link]().shape({


email: [Link]()
.email("Invalid email")
.required("Email is required"),

password: [Link]()
.min(6, "Password must be at least 6 characters")
.required("Password is required"),

name: [Link]()
.min(3, "Name must be at least 3 characters")
.required("Name is required"),
});

You might also like