diff --git a/justice40-frontend/src/components/map-slider.js b/justice40-frontend/src/components/map-slider.js new file mode 100644 index 00000000..b5bcc83e --- /dev/null +++ b/justice40-frontend/src/components/map-slider.js @@ -0,0 +1,26 @@ +import React, {useState} from 'react'; + +function MapSlider(props){ + const [value, setValue] = useState(0); + return ( +
+ + setValue(e.target.value)} + type="range" + min="0" + max="100" + step="20" + value="60" + /> +
+ ); +}; + +export default MapSlider; \ No newline at end of file diff --git a/justice40-frontend/src/pages/index.js b/justice40-frontend/src/pages/index.js index 185a766b..c7d7f7c5 100644 --- a/justice40-frontend/src/pages/index.js +++ b/justice40-frontend/src/pages/index.js @@ -1,10 +1,14 @@ -import React from 'react'; +import React, {useState} from 'react'; import Layout from '../components/layout'; import SEO from '../components/seo'; import OlMapWrapper from '../components/ol-map-wrapper'; +import MapSlider from '../components/map-slider'; import * as styles from "./index.module.css"; -const IndexPage = () => { + +function IndexPage(props) { + const [heat, setHeat] = useState(""); + return ( @@ -13,7 +17,11 @@ const IndexPage = () => {
-
+
+ + + +