Add product images, WhatsApp icons and Gmail enquiry forms
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Mihir Motiyani 2026-10-04 12:40:59 +05:30
parent 99cc8f4c26
commit d3dab294d1
21 changed files with 102 additions and 50 deletions

View File

@ -1,8 +1,8 @@
<!doctype html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg?v=2" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Mani Agro Exports | Indian Agricultural Products for Global Markets</title>
<meta name="description" content="Mani Agro Exports is a premier India-based exporter of Red Chilli Powder, Turmeric Powder, Coriander Powder, and Organic Vermicompost for international buyers, distributors, and food processors." />

View File

@ -1,7 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64">
<rect width="64" height="64" rx="14" fill="#1B4D3E" />
<circle cx="32" cy="32" r="24" fill="#102A22" stroke="#D49B24" stroke-width="2" />
<path d="M32 18 C26 24 24 34 32 44 C40 34 38 24 32 18 Z" fill="#D49B24" />
<path d="M32 24 C28 28 28 36 32 40 C36 36 36 28 32 24 Z" fill="#25D366" />
<line x1="32" y1="20" x2="32" y2="44" stroke="#102A22" stroke-width="1.5" stroke-linecap="round" />
</svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<rect width="64" height="64" rx="14" fill="#1B4D3E"/>
<path d="M17 40c0-18 12-27 32-26 0 22-10 34-27 31L17 40Z" fill="#D49B24"/>
<path d="M17 49 39 25" fill="none" stroke="#102A22" stroke-width="5" stroke-linecap="round"/>
</svg>

Before

Width:  |  Height:  |  Size: 488 B

After

Width:  |  Height:  |  Size: 297 B

BIN
public/images/coriander.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

BIN
public/images/turmeric.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 MiB

28
src/api/inquiries.ts Normal file
View File

@ -0,0 +1,28 @@
import type { InquiryFormData } from '../types';
export async function submitInquiry(inquiry: InquiryFormData): Promise<void> {
const controller = new AbortController();
const timeout = window.setTimeout(() => controller.abort(), 45000);
try {
const response = await fetch('/api/inquiries', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(inquiry),
signal: controller.signal,
});
if (!response.ok) {
throw new Error(response.status === 429
? 'Too many requests. Please wait a minute or contact us on WhatsApp.'
: 'Your inquiry could not be sent. Please try again or contact us on WhatsApp.');
}
const result: { ok?: boolean } = await response.json();
if (result.ok !== true) throw new Error('Your inquiry could not be confirmed. Please contact us on WhatsApp.');
} catch (failure) {
if (failure instanceof DOMException && failure.name === 'AbortError') {
throw new Error('Sending took too long to confirm. Please contact us on WhatsApp.');
}
throw failure;
} finally {
window.clearTimeout(timeout);
}
}

View File

@ -48,7 +48,7 @@ export const CompanyStory: React.FC = () => {
>
<Box
component="img"
src="/images/shipping-hero.jpg"
src="/images/shipping-hero.png"
alt="Global Trade"
sx={{ width: '100%', height: { xs: 320, md: 440 }, objectFit: 'cover' }}
/>

View File

@ -1,6 +1,6 @@
import React from 'react';
import { Box, Tooltip, Fab } from '@mui/material';
import { MessageCircle } from 'lucide-react';
import { WhatsAppIcon as MessageCircle } from '../WhatsAppIcon';
import { COMPANY_INFO } from '../../../data/companyData';
export const FloatingWhatsApp: React.FC = () => {

View File

@ -1,6 +1,7 @@
import React from 'react';
import { Box, Typography, Link, Button } from '@mui/material';
import { Phone, Mail, User, MapPin, MessageCircle } from 'lucide-react';
import { Phone, Mail, User, MapPin } from 'lucide-react';
import { WhatsAppIcon as MessageCircle } from '../WhatsAppIcon';
import { COMPANY_INFO } from '../../../data/companyData';
import { useQuote } from '../../../context/QuoteContext';

View File

@ -11,7 +11,8 @@ import {
Divider,
Button,
} from '@mui/material';
import { X, MessageCircle, FileText } from 'lucide-react';
import { X, FileText } from 'lucide-react';
import { WhatsAppIcon as MessageCircle } from '../WhatsAppIcon';
import { useNavigate } from 'react-router-dom';
import { COMPANY_INFO } from '../../../data/companyData';
import { useQuote } from '../../../context/QuoteContext';

View File

@ -8,7 +8,8 @@ import {
Button,
IconButton,
} from '@mui/material';
import { Menu, FileText, MessageCircle, Sprout } from 'lucide-react';
import { Menu, FileText, Sprout } from 'lucide-react';
import { WhatsAppIcon as MessageCircle } from '../WhatsAppIcon';
import { NavLink, useNavigate, useLocation } from 'react-router-dom';
import { TopAnnouncementBar } from './TopAnnouncementBar';
import { MobileDrawer } from './MobileDrawer';

View File

@ -1,3 +1,4 @@
import { submitInquiry } from '../../../api/inquiries';
import React, { useState, useEffect } from 'react';
import {
Dialog,
@ -12,7 +13,8 @@ import {
Alert,
CircularProgress,
} from '@mui/material';
import { X, Send, CheckCircle2, MessageCircle } from 'lucide-react';
import { X, Send, CheckCircle2 } from 'lucide-react';
import { WhatsAppIcon as MessageCircle } from '../WhatsAppIcon';
import confetti from 'canvas-confetti';
import { useQuote } from '../../../context/QuoteContext';
import { PRODUCTS } from '../../../data/productsData';
@ -29,14 +31,15 @@ export const QuoteModal: React.FC = () => {
phone: '',
country: '',
productInterest: '',
estimatedQuantity: '1x20ft Container (FCL)',
packagingPreference: '25kg Paper / PP Bags',
estimatedQuantity: '1x20ft Container (FCL - approx 14-18 MT)',
packagingPreference: '25kg Multi-layer Kraft Paper Bags',
destinationPort: '',
message: '',
});
const [submitted, setSubmitted] = useState(false);
const [loading, setLoading] = useState(false);
const [error, setError] = useState('');
useEffect(() => {
if (selectedProductForQuote) {
@ -57,19 +60,20 @@ export const QuoteModal: React.FC = () => {
setFormData((prev) => ({ ...prev, [name]: value }));
};
const handleSubmit = (e: React.FormEvent) => {
const handleSubmit = async (e: React.FormEvent) => {
e.preventDefault();
if (loading) return;
setLoading(true);
setTimeout(() => {
setLoading(false);
setError('');
try {
await submitInquiry(formData);
setSubmitted(true);
confetti({
particleCount: 80,
spread: 70,
origin: { y: 0.6 },
});
}, 800);
confetti({ particleCount: 70, spread: 60, origin: { y: 0.6 } });
} catch (failure) {
setError(failure instanceof Error ? failure.message : 'Unable to send. Please try WhatsApp.');
} finally {
setLoading(false);
}
};
const handleReset = () => {
@ -172,6 +176,7 @@ export const QuoteModal: React.FC = () => {
</Box>
) : (
<Box component="form" onSubmit={handleSubmit}>
{error && <Alert severity="error" role="alert" sx={{ mb: 2 }}>{error}</Alert>}
<Alert severity="info" sx={{ mb: 3, borderRadius: 2 }}>
Looking for commercial pricing, custom mesh size, ASTA color, or sample dispatch? Fill out your requirements below for an immediate response.
</Alert>

View File

@ -0,0 +1,11 @@
import type { SVGProps } from 'react';
type Props = SVGProps<SVGSVGElement> & { size?: number | string };
export function WhatsAppIcon({ size = 24, color = 'currentColor', ...props }: Props) {
return (
<svg width={size} height={size} viewBox="0 0 24 24" fill={color} aria-hidden="true" {...props}>
<path d="M20.52 3.48A11.9 11.9 0 0 0 12.05 0C5.47 0 .11 5.35.1 11.94c0 2.1.55 4.16 1.6 5.98L0 24l6.25-1.64a11.96 11.96 0 0 0 5.8 1.48h.01C18.64 23.84 24 18.49 24 11.9c0-3.19-1.24-6.18-3.48-8.42ZM12.05 21.83a9.9 9.9 0 0 1-5.04-1.38l-.36-.21-3.71.97.99-3.62-.24-.37a9.88 9.88 0 0 1-1.52-5.28c0-5.47 4.45-9.92 9.92-9.92a9.86 9.86 0 0 1 7.02 2.91 9.85 9.85 0 0 1 2.91 7.02c0 5.47-4.45 9.88-9.97 9.88Zm5.44-7.4c-.3-.15-1.76-.87-2.03-.97-.27-.1-.47-.15-.67.15-.2.3-.77.97-.94 1.17-.17.2-.35.22-.65.07-.3-.15-1.26-.46-2.4-1.48-.89-.8-1.49-1.78-1.66-2.08-.17-.3-.02-.46.13-.61.13-.13.3-.35.45-.52.15-.17.2-.3.3-.5.1-.2.05-.37-.03-.52-.07-.15-.67-1.61-.91-2.2-.24-.58-.49-.5-.67-.51h-.57c-.2 0-.52.07-.79.37-.27.3-1.04 1.01-1.04 2.47s1.07 2.87 1.22 3.07c.15.2 2.1 3.2 5.08 4.49.71.3 1.26.48 1.69.62.71.23 1.35.2 1.86.12.57-.09 1.76-.72 2.01-1.41.25-.7.25-1.29.17-1.41-.07-.12-.27-.2-.57-.35Z" />
</svg>
);
}

View File

@ -1,3 +1,4 @@
import { submitInquiry } from '../../../api/inquiries';
import React, { useState } from 'react';
import {
Box,
@ -6,14 +7,13 @@ import {
TextField,
MenuItem,
Button,
Stack,
Alert,
CircularProgress,
} from '@mui/material';
import { Send, CheckCircle2, MessageCircle } from 'lucide-react';
import { Send, CheckCircle2 } from 'lucide-react';
import { WhatsAppIcon as MessageCircle } from '../../common/WhatsAppIcon';
import confetti from 'canvas-confetti';
import { PRODUCTS } from '../../../data/productsData';
import { COMPANY_INFO } from '../../../data/companyData';
import { InquiryFormData } from '../../../types';
export const ContactForm: React.FC = () => {
@ -24,7 +24,7 @@ export const ContactForm: React.FC = () => {
phone: '',
country: '',
productInterest: 'All / Multiple Products',
estimatedQuantity: '1x20ft Container (FCL)',
estimatedQuantity: '1x20ft Container (FCL - 14 to 18 MT)',
packagingPreference: '25kg Paper / PP Bags',
destinationPort: '',
message: '',
@ -32,25 +32,27 @@ export const ContactForm: React.FC = () => {
const [submitted, setSubmitted] = useState(false);
const [loading, setLoading] = useState(false);
const [error, setError] = useState('');
const handleChange = (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {
const { name, value } = e.target;
setFormData((prev) => ({ ...prev, [name]: value }));
};
const handleSubmit = (e: React.FormEvent) => {
const handleSubmit = async (e: React.FormEvent) => {
e.preventDefault();
if (loading) return;
setLoading(true);
setTimeout(() => {
setLoading(false);
setError('');
try {
await submitInquiry(formData);
setSubmitted(true);
confetti({
particleCount: 70,
spread: 60,
origin: { y: 0.6 },
});
}, 700);
confetti({ particleCount: 70, spread: 60, origin: { y: 0.6 } });
} catch (failure) {
setError(failure instanceof Error ? failure.message : 'Unable to send. Please try WhatsApp.');
} finally {
setLoading(false);
}
};
const whatsappMsg = `Hello Mihir Motiyani, I am ${formData.name} from ${formData.companyName} (${formData.country}). Interested in ${formData.productInterest}. Qty: ${formData.estimatedQuantity}. Destination Port: ${formData.destinationPort}.`;
@ -103,6 +105,7 @@ export const ContactForm: React.FC = () => {
</Box>
) : (
<Box component="form" onSubmit={handleSubmit}>
{error && <Alert severity="error" role="alert" sx={{ mb: 2 }}>{error}</Alert>}
<Typography variant="h4" sx={{ fontWeight: 800, color: '#13201A', mb: 1 }}>
Send an Export RFQ / Inquiry
</Typography>

View File

@ -1,6 +1,7 @@
import React from 'react';
import { Box, Grid, Typography, Paper, Stack, Button, Link } from '@mui/material';
import { Phone, Mail, User, Clock, MessageCircle, MapPin } from 'lucide-react';
import { Phone, Mail, User, Clock, MapPin } from 'lucide-react';
import { WhatsAppIcon as MessageCircle } from '../../common/WhatsAppIcon';
import { COMPANY_INFO } from '../../../data/companyData';
export const ContactInfoCards: React.FC = () => {

View File

@ -1,6 +1,7 @@
import React from 'react';
import { Box, Container, Typography, Button, Chip } from '@mui/material';
import { FileText, ArrowRight, MessageCircle, CheckCircle } from 'lucide-react';
import { FileText, ArrowRight, CheckCircle } from 'lucide-react';
import { WhatsAppIcon as MessageCircle } from '../../common/WhatsAppIcon';
import { useNavigate } from 'react-router-dom';
import { useQuote } from '../../../context/QuoteContext';
import { COMPANY_INFO } from '../../../data/companyData';
@ -15,7 +16,7 @@ export const HeroSection: React.FC = () => {
sx={{
position: 'relative',
bgcolor: '#0D211A',
backgroundImage: 'linear-gradient(to right, rgba(13, 33, 26, 0.95) 0%, rgba(13, 33, 26, 0.85) 50%, rgba(13, 33, 26, 0.75) 100%), url(/images/shipping-hero.jpg)',
backgroundImage: 'linear-gradient(to right, rgba(13, 33, 26, 0.95) 0%, rgba(13, 33, 26, 0.85) 50%, rgba(13, 33, 26, 0.75) 100%), url(/images/shipping-hero.png)',
backgroundSize: 'cover',
backgroundPosition: 'center',
backgroundRepeat: 'no-repeat',

View File

@ -1,6 +1,7 @@
import React from 'react';
import { Box, Container, Typography, Button, Paper } from '@mui/material';
import { Handshake, PhoneCall, Mail, MessageCircle, FileText } from 'lucide-react';
import { Handshake, PhoneCall, Mail, FileText } from 'lucide-react';
import { WhatsAppIcon as MessageCircle } from '../../common/WhatsAppIcon';
import { COMPANY_INFO } from '../../../data/companyData';
import { useQuote } from '../../../context/QuoteContext';

View File

@ -1,6 +1,7 @@
import React from 'react';
import { Box, Container, Typography, Chip, Button, Stack } from '@mui/material';
import { FileText, MessageCircle } from 'lucide-react';
import { FileText } from 'lucide-react';
import { WhatsAppIcon as MessageCircle } from '../../common/WhatsAppIcon';
import { useQuote } from '../../../context/QuoteContext';
import { COMPANY_INFO } from '../../../data/companyData';

View File

@ -9,7 +9,7 @@ export const PRODUCTS: Product[] = [
tagline: 'Vibrant color, customizable heat levels, and aromatic pungency.',
shortDesc: 'Indian red chilli powder suitable for food processing, wholesale and international distribution. Sourced from the finest chilli growing regions with verified ASTA color values and controlled heat.',
fullDesc: 'Mani Agro Exports provides premium export-grade Red Chilli Powder processed from dried ripe pods of Capsicum annuum. We offer specialized varieties tailored to international market preferences — from bright red, mild heat Kashmiri style to fiery Guntur / Teja and deep red Byadgi blends. Every batch is finely pulverized in temperature-controlled mills to preserve essential capsaicin oils and natural pigments.',
image: '/images/red-chilli-powder.jpg',
image: '/images/red-chilli.png',
category: 'spices',
accentColor: '#BA2D1D',
badge: 'High Demand Export',
@ -54,7 +54,7 @@ export const PRODUCTS: Product[] = [
tagline: 'High curcumin content, radiant golden hue, and potent aroma.',
shortDesc: 'Quality Indian turmeric powder for food, spice and distribution markets. Processed from authentic Indian turmeric fingers with guaranteed curcumin retention.',
fullDesc: 'Indian Turmeric is globally celebrated for its high natural curcumin content and vivid golden-yellow pigment. Mani Agro Exports sources whole, cured turmeric fingers from premier agricultural hubs like Salem, Nizamabad, and Sangli. Our turmeric is processed through automated destoners, magnetic separators, and micro-pulverizers to ensure immaculate purity, zero lead chromate, and maximum active bio-compounds.',
image: '/images/turmeric-powder.jpg',
image: '/images/turmeric.png',
category: 'spices',
accentColor: '#D49B24',
badge: 'High Curcumin Grade',
@ -99,7 +99,7 @@ export const PRODUCTS: Product[] = [
tagline: 'Aromatic, green-tinged golden powder sourced for commercial supply.',
shortDesc: 'Aromatic coriander powder sourced and processed for commercial supply. Ground from clean coriander seeds to retain natural volatile oils and refreshing citrus aroma.',
fullDesc: 'Coriander powder is the backbone of Asian, Middle Eastern, and Mediterranean culinary seasoning. Mani Agro Exports utilizes select Eagle and Badami variety coriander seeds from the fertile belts of Rajasthan, Gujarat, and Madhya Pradesh. Through cold-milling techniques, we preserve the fragile essential oils (linalool), ensuring an inviting citrusy, herbal fragrance and consistent color.',
image: '/images/coriander-powder.jpg',
image: '/images/coriander.png',
category: 'spices',
accentColor: '#3E6B27',
badge: 'Aroma-Locked Milling',
@ -144,7 +144,7 @@ export const PRODUCTS: Product[] = [
tagline: '100% natural, nutrient-dense organic soil conditioner and plant booster.',
shortDesc: 'Vermicompost suitable for agriculture, horticulture, nurseries and soil improvement applications. Produced via controlled earthworm bio-decomposition.',
fullDesc: 'Mani Agro Exports supplies superior-grade Organic Vermicompost engineered through the bio-digestion of agricultural biomass and cow dung by Eisenia fetida earthworms. Rich in bio-available Nitrogen, Phosphorus, Potassium, beneficial soil microbes, and humic acids, our vermicompost revitalizes depleted soils, promotes vigorous root systems, and improves moisture retention for sustainable organic farming.',
image: '/images/vermicompost.jpg',
image: '/images/vermicompost.png',
category: 'organic-fertilizers',
accentColor: '#4A3B2C',
badge: '100% Organic Soil Conditioner',