import React, {Component} from 'react'; import { Button } from 'react-bootstrap'; import { translate, Trans } from 'react-i18next'; import {render} from 'react-dom'; // import { HashLink as Link } from 'react-router-hash-link'; // import { Link } from 'react-router-dom'; // https://www.npmjs.com/package/react-resize-detector import ReactResizeDetector from 'react-resize-detector'; import {ScrollToTopOnMount, SectionsContainer, Section} from 'react-fullpage'; import FiresMap from '../FiresMap/FiresMap'; import FireSubscription from '/imports/ui/pages/FireSubscription/FireSubscription'; import 'html5-device-mockups/dist/device-mockups.min.css'; import './Index.scss'; import './Index-custom.scss'; class Index extends Component { // Debounce by David Walsch // https://davidwalsh.name/javascript-debounce-function constructor(props) { super(props); } debounce = (func, wait, immediate) => { var timeout; return function() { var context = this, args = arguments; var later = function() { timeout = null; if (!immediate) func.apply(context, args); }; var callNow = immediate && !timeout; clearTimeout(timeout); timeout = setTimeout(later, wait); if (callNow) func.apply(context, args); }; }; scaleHeader = () => { var scalable = document.getElementById('tcefh1'); var margin = 10; var scalableContainer = scalable.parentNode; scalable.style.transform = 'scale(1)'; var scalableContainerWidth = scalableContainer.offsetWidth - margin; var scalableWidth = scalable.offsetWidth; scalable.style.transform = 'scale(' + scalableContainerWidth / scalableWidth + ')'; scalableContainer.style.height = scalable.getBoundingClientRect().height + 'px'; }; myScaleFunction = this.debounce(() => { this.scaleHeader(); }, 250); _onResize = () => { this.myScaleFunction(); }; componentDidMount = () => { $('.carousel').carousel(); } handleBtnClick = (event) => { window.open('https://t.me/TodosContraElFuego_bot', '_blank'); } render() { // https://github.com/subtirelumihail/react-fullpage let fullPageOptions = { activeClass: 'active', // the class that is appended to the sections links anchors: ['home', 'crowdsourcing', 'platforms', 'participe', 'fires'], // the anchors for each sections arrowNavigation: false, // use arrow keys (true after development) className: 'section-container', // the class name for the section container delay: 1000, // the scroll animation speed navigation: true, // use dots navigation scrollBar: false, // use the browser default scrollbar sectionClassName: 'section', // the section class name sectionPaddingTop: '0', // the section top padding sectionPaddingBottom: '0', // the section bottom padding verticalAlign: false // align the content of each section vertical }; return (
Siempre alerta a los fuegos en nuestro vecindario
{/* {this.props.t('Participa')} */}