+ );
+};
+
+export default ItemReviews;
\ No newline at end of file
diff --git a/frontend/src/components/LocationMap.tsx b/frontend/src/components/LocationMap.tsx
new file mode 100644
index 0000000..287d0be
--- /dev/null
+++ b/frontend/src/components/LocationMap.tsx
@@ -0,0 +1,83 @@
+import React, { useEffect, useRef } from 'react';
+
+interface LocationMapProps {
+ latitude?: number;
+ longitude?: number;
+ location: string;
+ itemName: string;
+}
+
+const LocationMap: React.FC = ({ latitude, longitude, location, itemName }) => {
+ const mapRef = useRef(null);
+
+ useEffect(() => {
+ // If we have coordinates, use them directly
+ if (latitude && longitude && mapRef.current) {
+ // Create a simple map using an iframe with OpenStreetMap
+ const mapUrl = `https://www.openstreetmap.org/export/embed.html?bbox=${longitude-0.01},${latitude-0.01},${longitude+0.01},${latitude+0.01}&layer=mapnik&marker=${latitude},${longitude}`;
+
+ mapRef.current.innerHTML = `
+
+ `;
+ } else if (location && mapRef.current) {
+ // If we only have a location string, try to show it on the map
+ // For a more robust solution, you'd want to use a geocoding service
+ const encodedLocation = encodeURIComponent(location);
+ const mapUrl = `https://www.openstreetmap.org/export/embed.html?bbox=-180,-90,180,90&layer=mapnik&marker=`;
+
+ // For now, we'll show a static map with a search link
+ mapRef.current.innerHTML = `
+
+ );
+};
+
+export default ReviewModal;
\ No newline at end of file
diff --git a/frontend/src/pages/Home.tsx b/frontend/src/pages/Home.tsx
index bd0bd4c..c05f762 100644
--- a/frontend/src/pages/Home.tsx
+++ b/frontend/src/pages/Home.tsx
@@ -7,129 +7,264 @@ const Home: React.FC = () => {
return (
-
+ {/* Hero Section */}
+
-
+
- Rent Equipment from Your Neighbors
+ Rent Anything, From Anyone, Anywhere
- Why buy when you can rent? Find gym equipment, tools, and musical instruments
- available for rent in your area. Save money and space while getting access to
- everything you need.
+ Join the sharing economy. Rent items you need for a fraction of the cost,
+ or earn money from things you already own.
-
-
- Browse Items
+
+
+ Start Renting
{user ? (
-
- List Your Item
+
+ List Your Items
) : (
-
- Start Renting
+
+ Start Earning
)}
+
+
+
+
+
+
+
+ {/* How It Works - For Renters */}
+
+
+
For Renters: Get What You Need, When You Need It
+
+
+
+
+
+
1. Find What You Need
+
+ Browse our marketplace for tools, equipment, electronics, and more.
+ Filter by location, price, and availability.
+
+
+
+
+
+
+
2. Book Your Rental
+
+ Select your rental dates, choose delivery or pickup, and pay securely.
+ Your payment is held until the owner confirms.
+
+
+
+
+
+
+
3. Enjoy & Return
+
+ Use the item for your project or event, then return it as agreed.
+ Rate your experience to help the community.
+
+
+
+
+
+
+ {/* How It Works - For Owners */}
+
+
+
For Owners: Turn Your Idle Items Into Income
+
+
+
+
+
+
1. List Your Items
+
+ Take photos, set your price, and choose when your items are available.
+ List anything from power tools to party supplies.
+
+
+
+
+
+
+
2. Accept Requests
+
+ Review rental requests and accept the ones that work for you.
+ Set your own rules and requirements.
+
+
+
+
+
+
+
3. Get Paid
+
+ Earn money from items sitting in your garage.
+ Payments are processed securely after each rental.
+
+
+
+
+
+
+ {/* Popular Categories */}
+
+
+
Popular Rental Categories
+
+
+
+
+
+
Tools
+
+
+
+
+
+
+
+
Electronics
+
+
+
+
+
+
+
+
Sports
+
+
+
+
+
+
+
+
Music
+
+
+
+
+
+
+
+
Party
+
+
+
+
+
+
+
+
Outdoor
+
+
+
+
+
+
+
+ {/* Benefits Section */}
+
+
+
-
+
Why Choose Rentall?
+
+
+
+
Save Money
+
Why buy when you can rent? Access expensive items for a fraction of the purchase price.
+
+
+
+
+
+
Earn Extra Income
+
Turn your unused items into a revenue stream. Your garage could be a goldmine.
+
+
+
+
+
+
Build Community
+
Connect with neighbors and help each other. Sharing builds stronger communities.
+
+
+
+
+
+
Reduce Waste
+
Share instead of everyone buying. It's better for your wallet and the planet.
+
+
+
+
+
-
+
-
-
-
Popular Categories
-
-
-
-
-
-
Tools
-
- Power tools, hand tools, and equipment for your DIY projects
-
-
- Browse Tools
-
-
-
-
-
-
-
-
-
Gym Equipment
-
- Weights, machines, and fitness gear for your workout needs
-
-
- Browse Gym Equipment
-
-
-
-
-
-
-
-
-
Musical Instruments
-
- Guitars, keyboards, drums, and more for musicians
-
-
- Browse Instruments
-
-
-
-
+ {/* CTA Section */}
+
+
+
Ready to Get Started?
+
+ Join thousands of people sharing and renting in your community
+
+
+
+ Browse Rentals
+
+ {user ? (
+
+ List an Item
+
+ ) : (
+
+ Sign Up Free
+
+ )}
-
+
-
+ {/* Stats Section */}
+
-
How It Works
-
-
-
- 1
-
-
Search
-
Find the equipment you need in your area
+
+
+
1000+
+
Active Items
-
-
- 2
-
-
Book
-
Reserve items for the dates you need
+
+
500+
+
Happy Renters
-
-
- 3
-
-
Pick Up
-
Collect items or have them delivered
+
+
$50k+
+
Earned by Owners
-
-
- 4
-
-
Return
-
Return items when you're done
+
+
4.8★
+
Average Rating
-
+
);
};
diff --git a/frontend/src/pages/ItemDetail.tsx b/frontend/src/pages/ItemDetail.tsx
index 7f86dda..eec160c 100644
--- a/frontend/src/pages/ItemDetail.tsx
+++ b/frontend/src/pages/ItemDetail.tsx
@@ -3,6 +3,8 @@ import { useParams, useNavigate } from 'react-router-dom';
import { Item, Rental } from '../types';
import { useAuth } from '../contexts/AuthContext';
import { itemAPI, rentalAPI } from '../services/api';
+import LocationMap from '../components/LocationMap';
+import ItemReviews from '../components/ItemReviews';
const ItemDetail: React.FC = () => {
const { id } = useParams<{ id: string }>();
@@ -116,6 +118,30 @@ const ItemDetail: React.FC = () => {