Améliorations mineures

This commit is contained in:
Sébastien Rivière
2025-05-18 15:29:43 +02:00
parent 50c258c540
commit 84239feb4a
7 changed files with 32 additions and 24 deletions

View File

@@ -41,7 +41,7 @@ export function CircularAreaPicker({ area, setArea, markerPosition, ...props })
const location = useLocation(Infinity);
const { handleClick, handleMouseMove, center, radius } = useMapCircleDraw(area, setArea);
return (
<MapContainer {...props} className='min-h-full w-full ' center={[0, 0]} zoom={0} scrollWheelZoom={true}>
<MapContainer {...props} className='min-h-full w-full ' center={[48.7143326, 2.20564757]} zoom={14} scrollWheelZoom={true}>
<TileLayer
attribution='&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
@@ -84,7 +84,7 @@ export function ZonePicker({ minZone, setMinZone, maxZone, setMaxZone, editMode,
return (
<div>
<div className='h-96'>
<MapContainer {...props} className='min-h-full w-full ' center={[0, 0]} zoom={0} scrollWheelZoom={true}>
<MapContainer {...props} className='min-h-full w-full ' center={[48.7143326, 2.20564757]} zoom={14} scrollWheelZoom={true}>
<TileLayer
attribution='&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"

View File

@@ -4,11 +4,15 @@ import BlueButton from '../util/button'
export default function TeamAddForm({onAddTeam}) {
const [teamName, setTeamName] = React.useState('');
function handleSubmit(e) {
e.preventDefault();
onAddTeam(teamName);
setTeamName("")
if (teamName !== "") {
onAddTeam(teamName);
setTeamName("")
}
}
return (
<form className='flex flex-row m-y-5' onSubmit={handleSubmit}>
<div className='w-4/5'>

View File

@@ -95,7 +95,7 @@ export default function TeamEdit({ selectedTeamId, setSelectedTeamId }) {
<CircularAreaPicker area={team.startingArea} setArea={(startingArea) => updateTeam(team.id, { startingArea })} markerPosition={team?.currentLocation} />
</div>
<div className='w-1/2'>
<img className='self-stretch' ref={teamImage} />
<img className='self-stretch' ref={teamImage} onError={(e) => {e.target.src = "/images/missing_image.jpg"}} />
</div>
</div>
</div>