From 9fafc177491d8f17c8d80e7e138c8c6b05ec3e6c Mon Sep 17 00:00:00 2001 From: vjrj Date: Thu, 25 Jan 2018 16:53:50 +0100 Subject: [PATCH] Partipe btn and link --- imports/ui/pages/Index/Index-custom.scss | 1 + imports/ui/pages/Index/Index.js | 20 ++++++++++++++++--- .../pages/Subscriptions/SubscriptionsMap.js | 15 +++++++++++++- 3 files changed, 32 insertions(+), 4 deletions(-) diff --git a/imports/ui/pages/Index/Index-custom.scss b/imports/ui/pages/Index/Index-custom.scss index 32ed7e8..9a96a5e 100644 --- a/imports/ui/pages/Index/Index-custom.scss +++ b/imports/ui/pages/Index/Index-custom.scss @@ -126,6 +126,7 @@ .slide-1-icon:before { content: ""; + cursor: pointer; } .slide-2-icon { diff --git a/imports/ui/pages/Index/Index.js b/imports/ui/pages/Index/Index.js index 8741167..9df8b01 100644 --- a/imports/ui/pages/Index/Index.js +++ b/imports/ui/pages/Index/Index.js @@ -68,6 +68,13 @@ class Index extends Component { window.open('https://t.me/TodosContraElFuego_bot', '_blank'); } + gotoParticipe() { + const element = document.querySelector('#participe'); + if (element) { + element.scrollIntoView(); + } + } + render() { return (
@@ -79,10 +86,10 @@ class Index extends Component {
{ this.slides = ref; }} > - {/* for dev: data-interval=false */} + {/* for dev ^^^: data-interval=false */}
  1. @@ -92,7 +99,13 @@ class Index extends Component {
    -
    +
    { this.gotoParticipe(); }} + onClick={() => { this.gotoParticipe(); }} + />

    Elige un lugar

    @@ -164,6 +177,7 @@ class Index extends Component {

    +

    Suscríbete a alertas de fuegos

    diff --git a/imports/ui/pages/Subscriptions/SubscriptionsMap.js b/imports/ui/pages/Subscriptions/SubscriptionsMap.js index a847ef5..ba7b434 100644 --- a/imports/ui/pages/Subscriptions/SubscriptionsMap.js +++ b/imports/ui/pages/Subscriptions/SubscriptionsMap.js @@ -4,7 +4,7 @@ /* eslint-disable react/jsx-indent */ import React, { Fragment } from 'react'; import PropTypes from 'prop-types'; -import { ButtonGroup, Row, Col } from 'react-bootstrap'; +import { Button, ButtonGroup, Row, Col } from 'react-bootstrap'; import { Meteor } from 'meteor/meteor'; import { withTracker } from 'meteor/react-meteor-data'; import { Trans, translate } from 'react-i18next'; @@ -74,6 +74,13 @@ class SubscriptionsMap extends React.Component { this.setState({ init: false, viewport }); } + gotoParticipe() { + const element = document.querySelector('#participe'); + if (element) { + element.scrollIntoView(); + } + } + render() { console.log(`Rendering Subs users ready ${this.props.subsready} subs: ${this.props.userSubs.length} viewport: ${JSON.stringify(this.state.viewport)}`); return ( @@ -111,6 +118,12 @@ class SubscriptionsMap extends React.Component { this.centerOnUserLocation(viewport)} onlyIcon {... this.props} /> +