source: imaps-frontend/src/pages/FinkiMaps/FinkiMaps.jsx@ d565449

main
Last change on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 1.5 KB
Line 
1import React, { useEffect, useState } from "react";
2import SearchBar from "../../components/SearchBar/SearchBar";
3import FilterBar from "../../components/FilterBar/FilterBar";
4import Profile from "../../components/Profile/Profile";
5import SideBar from "../../components/SideBar/SideBar";
6import Draw from "../../pages/Draw/Draw";
7import { MapDisplay } from "../../scripts/main/MapDisplay.js";
8import MapControls from "../../components/MapControls/MapControls";
9import styles from "./FinkiMaps.module.css";
10
11function FinkiMaps() {
12 const [app,setApp] = useState(null);
13
14 useEffect(() => {
15 const app = new MapDisplay("map");
16 app.loadMap();
17 setApp(app);
18 }, []);
19
20 const handleZoomIn = () => {
21 console.log("Zooming in");
22 };
23
24 const handleZoomOut = () => {
25 console.log("Zooming out");
26 };
27
28 const handleFloorChange = (floor) => {
29 console.log(`Switched to floor ${floor}`);
30 };
31
32 return (
33 <div id="main" className={styles.main}>
34 <div id="map" className={styles.mapContainer}></div>
35 <div className={styles.toolbar}>
36 <SideBar />
37 <div className={styles.left}>
38 <SearchBar map={app}/>
39 <FilterBar />
40 </div>
41 <div className={styles.right}>
42 <Profile />
43 </div>
44 </div>
45
46 <div className={styles.mapControlsContainer}>
47 <MapControls onZoomIn={handleZoomIn} onZoomOut={handleZoomOut} onFloorChange={handleFloorChange} />
48 </div>
49 </div>
50 );
51}
52
53export default FinkiMaps;
Note: See TracBrowser for help on using the repository browser.