diff --git a/src/Components/Homepage/BestDeals.tsx b/src/Components/Homepage/BestDeals.tsx index ed2c20f3..40f57abe 100644 --- a/src/Components/Homepage/BestDeals.tsx +++ b/src/Components/Homepage/BestDeals.tsx @@ -1,15 +1,12 @@ import React, { useEffect, useState } from 'react'; -import { useAllProductsQuery } from '../../Redux/productsPage/productSlice'; const BestDeals: React.FC = () => { const [imageUrl, setImageUrl] = useState(null); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); - const { data: hotDeal, isLoading, isError } = useAllProductsQuery({}) - console.log(hotDeal) - const productId = "084bfddb-c87a-42b0-aa27-2f71f39e7671"; + const productId = "084bfddb-c87a-42b0-aa27-2f71f39e7671"; useEffect(() => { @@ -23,7 +20,7 @@ const BestDeals: React.FC = () => { } const data = await response.json(); - const imageUrl = data.image; + const imageUrl = data.image; setImageUrl(imageUrl); } catch (error: any) { setError('Failed to load image'); @@ -36,35 +33,35 @@ const BestDeals: React.FC = () => { }, [productId]); return ( -
- {isLoading ? ("locing...") : ( - <> - -
-

- Best Deals -

-

- On the other hand, we denounce with righteous indignation and dislike men who are - so beguiled and demoralized by the charms of pleasure of the moment, so blinded by - desire, that they cannot foresee the pain and trouble that are bound to ensue; and - -

-

- From    678,453   - Rwf -

- -
-
- Samsung TV -
- - )} -
+
+
+

+ Best Samsung TV Deals +

+

+ Discover the latest Samsung TV deals at unbeatable prices. Whether + you are upgrading your home entertainment setup or looking for the perfect gift, + we've got you covered. +

+

+ From    678,453   + Rwf +

+ +
+
+ {loading ? ( +
Loading...
+ ) : error ? ( +
Error: {error}
+ ) : ( + Samsung TV + )} +
+
); }; -export default BestDeals; +export default BestDeals; \ No newline at end of file diff --git a/src/Components/Homepage/ContactSection.tsx b/src/Components/Homepage/ContactSection.tsx index 713e34a8..4bfd27be 100644 --- a/src/Components/Homepage/ContactSection.tsx +++ b/src/Components/Homepage/ContactSection.tsx @@ -7,53 +7,38 @@ import { useTranslation } from "react-i18next"; interface Props { status: 'idle' | 'loading' | 'succeeded' | 'failed'; error: string | null; - sendMessage: (messageData: { name: string; email: string; content: string }) => void; + sendMessage: (messageData: { name: string; email: string; content: string }) => void; } const ContactSection: React.FC = ({ status, error, sendMessage }) => { const [name, setName] = useState(''); const [email, setEmail] = useState(''); - const [content, setContent] = useState(''); + const [content, setContent] = useState(''); const handleSubmit = (e: React.FormEvent) => { e.preventDefault(); console.log('Form Data:', { name, email, content }); - if (!name || !email || !content) { + if (!name || !email || !content) { alert('All fields are required.'); return; } - sendMessage({ name, email, content }); + sendMessage({ name, email, content }); }; return ( -
-
-
-

Get In Touch With Us

-

We Are Here To Help

-
+
+
+

Get In Touch With Us

+

We Are Here To Help

-
-
- - - - - -

If you have an urgent business concern please contact us at 07********0

-
-
- - - - - - -

If you have an urgent business concern please contact us at 07********0

+
+
+ +

If you have an urgent business concern please contact us at 07********0

@@ -64,14 +49,14 @@ const ContactSection: React.FC = ({ status, error, sendMessage }) => {
-
-

Send Us Message

+
+

Send Us Message

setName(e.target.value)} /> @@ -80,7 +65,7 @@ const ContactSection: React.FC = ({ status, error, sendMessage }) => { setEmail(e.target.value)} /> @@ -88,9 +73,9 @@ const ContactSection: React.FC = ({ status, error, sendMessage }) => {