diff --git a/frontend/src/pages/Home.jsx b/frontend/src/pages/Home.jsx
index d8b025d..e3d8c1d 100644
--- a/frontend/src/pages/Home.jsx
+++ b/frontend/src/pages/Home.jsx
@@ -27,9 +27,9 @@ const Home = () => {
try {
setLoading(true);
const [destinationsData, specialsData] = await Promise.all([
- destinationsAPI.getAll(),
- specialsAPI.getAll()
- ]);
+ destinationsAPI.getAll(),
+ specialsAPI.getAll()]
+ );
setDestinations(destinationsData);
setSpecials(specialsData);
} catch (error) {
@@ -41,8 +41,8 @@ const Home = () => {
};
// Get special destinations
- const specialDestinations = specials.map(special => {
- const dest = destinations.find(d => d.id === special.destination_id);
+ const specialDestinations = specials.map((special) => {
+ const dest = destinations.find((d) => d.id === special.destination_id);
if (!dest) return null;
return {
...dest,
@@ -54,10 +54,10 @@ const Home = () => {
}).filter(Boolean);
// Filter destinations
- const filteredDestinations = destinations.filter(dest => {
+ const filteredDestinations = destinations.filter((dest) => {
const matchesCategory = selectedCategory === 'All' || dest.category === selectedCategory;
const matchesSearch = dest.name.toLowerCase().includes(searchQuery.toLowerCase()) ||
- dest.location.toLowerCase().includes(searchQuery.toLowerCase());
+ dest.location.toLowerCase().includes(searchQuery.toLowerCase());
return matchesCategory && matchesSearch;
});
@@ -92,9 +92,9 @@ const Home = () => {
style={{
backgroundImage: 'url(https://images.unsplash.com/photo-1488646953014-85cb44e25828?w=1600&q=80)',
backgroundSize: 'cover',
- backgroundPosition: 'center',
- }}
- >
+ backgroundPosition: 'center'
+ }}>
+
@@ -102,23 +102,23 @@ const Home = () => {
Discover Your Next Adventure
-
- Explore breathtaking destinations around the world with Epic Travel
+
Explore breathtaking destinations around the world with Epic Travel & Expeditions
+
@@ -138,24 +138,24 @@ const Home = () => {
- {loading ? (
-
+ {loading ?
+
- ) : specialDestinations.length === 0 ? (
-
+
:
+ specialDestinations.length === 0 ?
+
No special offers available at the moment.
-
- ) : (
-
- {specialDestinations.map((special) => (
-
+
:
+
+
+ {specialDestinations.map((special) =>
+

+ src={special.image}
+ alt={special.name}
+ className="w-full h-64 object-cover group-hover:scale-110 transition-transform duration-500" />
+
{special.discount}% OFF
@@ -174,12 +174,12 @@ const Home = () => {
{special.description}
- {special.highlights.map((highlight, idx) => (
-
+ {special.highlights.map((highlight, idx) =>
+
{highlight}
- ))}
+ )}
@@ -198,9 +198,9 @@ const Home = () => {
- ))}
+ )}
- )}
+ }
@@ -225,38 +225,38 @@ const Home = () => {
placeholder="Search destinations..."
value={searchQuery}
onChange={(e) => setSearchQuery(e.target.value)}
- className="pl-10"
- />
+ className="pl-10" />
+
- {categories.map(category => (
-
{/* Destinations Grid */}
- {loading ? (
-
+ {loading ?
+
Loading destinations...
-
- ) : (
-
- {filteredDestinations.map((destination) => (
-
+
:
+
+
+ {filteredDestinations.map((destination) =>
+

+ src={destination.image}
+ alt={destination.name}
+ className="w-full h-64 object-cover group-hover:scale-110 transition-transform duration-500" />
+
{destination.rating}
@@ -285,9 +285,9 @@ const Home = () => {
- ))}
+ )}
- )}
+ }
@@ -304,29 +304,29 @@ const Home = () => {
- {testimonials.map((testimonial) => (
-
+ {testimonials.map((testimonial) =>
+

+ src={testimonial.image}
+ alt={testimonial.name}
+ className="w-16 h-16 rounded-full object-cover mr-4" />
+
{testimonial.name}
{testimonial.location}
- {[...Array(testimonial.rating)].map((_, i) => (
-
- ))}
+ {[...Array(testimonial.rating)].map((_, i) =>
+
+ )}
"{testimonial.text}"
- ))}
+ )}
@@ -350,8 +350,8 @@ const Home = () => {
placeholder="Your Name"
value={contactForm.name}
onChange={(e) => setContactForm({ ...contactForm, name: e.target.value })}
- required
- />
+ required />
+
{
placeholder="Your Email"
value={contactForm.email}
onChange={(e) => setContactForm({ ...contactForm, email: e.target.value })}
- required
- />
+ required />
+
@@ -408,8 +408,8 @@ const Home = () => {
value={newsletterEmail}
onChange={(e) => setNewsletterEmail(e.target.value)}
className="bg-white/20 border-white/30 text-white placeholder:text-cyan-100"
- required
- />
+ required />
+
Subscribe Now
@@ -421,8 +421,8 @@ const Home = () => {
-
- );
+ );
+
};
-export default Home;
+export default Home;
\ No newline at end of file