79556924

Date: 2025-04-05 12:08:00
Score: 1
Natty:
Report link

// A basic React concept for the World Compliment Map import React, { useState } from 'react'; import { MapContainer, TileLayer, Marker, Popup } from 'react-leaflet'; import 'leaflet/dist/leaflet.css'; import { Button } from '@/components/ui/button'; import { Card, CardContent } from '@/components/ui/card';

const compliments = [ { id: 1, message: "You're doing better than you think!", position: [40.7128, -74.006], from: 'New York, USA' }, { id: 2, message: "Your smile can light up a room!", position: [35.6895, 139.6917], from: 'Tokyo, Japan' }, ];

export default function WorldComplimentMap() { const [messages, setMessages] = useState(compliments);

return ( World Compliment Map <MapContainer center={[20, 0]} zoom={2} style={{ height: '500px', borderRadius: '1rem' }}> {messages.map((msg) => ( {msg.message}
- {msg.from} ))} Add Your Compliment

<Button variant="outline" onClick={() => alert('Feature coming soon!')}> Write Something Nice ); }

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Jeswanth Reddy