Remove active fires in home for mobiles
This commit is contained in:
parent
edb3d20fca
commit
2e39c4eb52
1 changed files with 15 additions and 7 deletions
|
|
@ -2,7 +2,7 @@
|
|||
/* eslint-disable react/jsx-indent-props */
|
||||
/* eslint-disable key-spacing */
|
||||
/* eslint-env jquery */
|
||||
import React, { Component } from 'react';
|
||||
import React, { Component, Fragment } from 'react';
|
||||
import { translate, Trans } from 'react-i18next';
|
||||
import PropTypes from 'prop-types';
|
||||
// import { HashLink as Link } from 'react-router-hash-link';
|
||||
|
|
@ -40,6 +40,18 @@ class Index extends Component {
|
|||
this.myScaleFunction();
|
||||
}
|
||||
|
||||
getMap(isMobile) {
|
||||
if (!isMobile) {
|
||||
return (
|
||||
<Section className="">
|
||||
<div className="container">
|
||||
<FiresMap />
|
||||
</div>
|
||||
</Section>);
|
||||
}
|
||||
return (<Fragment />);
|
||||
}
|
||||
|
||||
scaleHeader() {
|
||||
const scalable = document.getElementById('tcefh1');
|
||||
const margin = 10;
|
||||
|
|
@ -58,8 +70,8 @@ class Index extends Component {
|
|||
render() {
|
||||
// https://github.com/subtirelumihail/react-fullpage
|
||||
const fullPageOptions = {
|
||||
anchors: isAnyMobile ? ['home', 'crowdsourcing', 'participe', 'platforms'] : ['home', 'crowdsourcing', 'participe', 'fires', 'platforms'], // the anchors for each sections
|
||||
activeClass: 'active', // the class that is appended to the sections links
|
||||
anchors: ['home', 'crowdsourcing', 'participe', 'fires', 'platforms'], // the anchors for each sections
|
||||
arrowNavigation: true, // use arrow keys (true after development)
|
||||
className: 'section-container', // the class name for the section container
|
||||
delay: 1000, // the scroll animation speed
|
||||
|
|
@ -169,11 +181,7 @@ class Index extends Component {
|
|||
<div className="overlay" />
|
||||
</Section>
|
||||
|
||||
<Section className="">
|
||||
<div className="container">
|
||||
<FiresMap />
|
||||
</div>
|
||||
</Section>
|
||||
{this.getMap(isAnyMobile)}
|
||||
|
||||
<Section className="platf">
|
||||
<div className="container">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue