Skip to content

Commit

Permalink
added a bunch of stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Dannysht committed Sep 2, 2024
1 parent 41ce391 commit 75c7dee
Show file tree
Hide file tree
Showing 12 changed files with 1,261 additions and 480 deletions.
11 changes: 11 additions & 0 deletions frontend/src/Components/Common/EditedModal.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import '../../static/stylesheets/modal.css'
export const Modal = ({ onClose }) => {
return (
<div id="modal-overlay">
<div id="modal">
<h4>Площадката беше променена успешно и отново ще бъде показана на картата след одобрение от администратор</h4>
<button onClick={onClose}>Затвори</button>
</div>
</div>
)
}
242 changes: 121 additions & 121 deletions frontend/src/Components/Common/InfoCard.jsx

Large diffs are not rendered by default.

11 changes: 5 additions & 6 deletions frontend/src/Components/Common/Map.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ export const Map = ({ onCoordinatesChange, currentPlaygroundCords }) => {
const fetchData = async () => {
const receivedItems = await fetch("https://kidsground.bg:8009/v1/playgrounds/all");
const receivedItemsJSON = await receivedItems.json();
console.log(receivedItemsJSON[0].age_group);
setPlaygrounds(receivedItemsJSON);
};

Expand Down Expand Up @@ -217,7 +216,7 @@ export const Map = ({ onCoordinatesChange, currentPlaygroundCords }) => {
<div id="google-map">
<Terrain id="terrain" onClick={handleMapTypeChange} />
<GoogleMap
options={{ controlSize: 0, gestureHandling: "greedy", clickableIcons: false}}
options={{ controlSize: 0, gestureHandling: "greedy", clickableIcons: false }}
mapContainerStyle={mapContainerStyle}
zoom={zoomLevel}
center={currentPlaygroundCords ? currentPlaygroundCords : currentPosition}
Expand Down Expand Up @@ -270,19 +269,19 @@ export const Map = ({ onCoordinatesChange, currentPlaygroundCords }) => {
<div id="legend-window">
<p>Легенда</p>
<div className='legend-row'>
<img height="35px" src='user_location.png' alt='user_location'/>
<img height="35px" src='user_location.png' alt='user_location' />
<p>Моята локация</p>
</div>
<div className='legend-row'>
<img src='zero_to_three.png' alt='zero_to_three' />
<p>За деца от 0 до 3 години</p>
</div>
<div className='legend-row'>
<img src='three_to_six.png' alt='three_to_six.png'/>
<img src='three_to_six.png' alt='three_to_six.png' />
<p>За деца от 3 до 6 години</p>
</div>
<div className='legend-row'>
<img src='three_to_twelve.png' alt='three_to_twelve'/>
<img src='three_to_twelve.png' alt='three_to_twelve' />
<p>За деца от 3 до 12 години</p>
</div >
<div className='legend-row'>
Expand All @@ -293,7 +292,7 @@ export const Map = ({ onCoordinatesChange, currentPlaygroundCords }) => {
</GoogleMap>
<Location onClick={showCurrentLocation} id="location" />
<Legend onMouseOver={handleLegendHover} onMouseLeave={() => setShowLegend(false)} id="legend" />

</div>
);
};
6 changes: 4 additions & 2 deletions frontend/src/Components/Navigation/PageRoutes.jsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
import {Routes, Route} from "react-router-dom"
import { Routes, Route } from "react-router-dom"
import { HomePage } from "../Pages/HomePage"
import { PlaygroundPage } from "../Pages/PlaygroundPage"
import { LoginPage } from "../Pages/LoginPage"
import { PlaygroundFormPage } from "../Pages/PlaygroundFormPage"
import { ProfilePage } from "../Pages/ProfilePage"
import { EditPage } from "../Pages/EditPage"

export const PageRoutes = () => {
return(
return (
<Routes>
<Route exact path="/" element={<HomePage />} />
<Route exact path="/playground/:id" element={<PlaygroundPage />} />
<Route exact path="/login" element={<LoginPage />} />
<Route exact path="/add" element={<PlaygroundFormPage />} />
<Route exact path="/profile" element={<ProfilePage />} />
<Route exact path="/edit/:id" element={<EditPage />} />
</Routes>
)
}
Loading

0 comments on commit 75c7dee

Please sign in to comment.