-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
40 lines (30 loc) · 980 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import React, { useState, useEffect } from "react";
import { Spinner } from 'react-bootstrap';
import regeneratorRuntime from "regenerator-runtime";
/*
*
*
* HAVE A LOOK AT https://react-leaflet.js.org/
*
*
*/
import './MapContainer.css'
let MapContainer = (props) => {
let classes = ["MapContainer"];
classes.push(props.className);
// I add all relevant functions and variables to the specific component to keep track of where everything lies
const position = [51.505, -0.09];
// we only want to start the map when the component is mounted
useEffect(() => {
}, [])
// using an empty array here, means basically once the component is mounted, otherwise we can force a rerender evertime a variable changes
return(
// Lyrics button gets the toggle function to "setState" of lyrics.
<div
id="map"
className={classes.join(' ')}>
<Spinner animation="border" variant="primary" />
</div>
)
}
export default MapContainer;