import React, { Component } from "react";
import Drawer from "./drawer";
import cookie from 'react-cookies'
import api from './api/api'
class family_share_orientation extends Component {
  constructor(props) {
    super(props);
    if (
      localStorage.getItem("current_state") !== "family_share_orientation") {
        this.props.history.push("/menu_page");
      }
    console.log("session", localStorage.getItem("current_state"));
    console.log("is_active", localStorage.getItem("login_is_active"));
    localStorage.setItem("family_share", 1);
    this.state = {
      is_active: localStorage.getItem("login_is_active") == 1 ? true : false
    };
  }

  render() {
    return (
      <div className="page-bg">
        {this.state.is_active && <Drawer prop={this.props} />}
       
        <div className="welcome_txt2 family_share_orientation_div text-center m_t10">
          Want to increase your odds of winning a contest<br />
          <b>Go back and share</b>
        </div>
        <div className="text-center f_share_img_div">
          <img
            src={api.image_path+"btn-socialshare.jpg"}
            alt=""
            title=""
            className="fs_img"
          />
          <p className="pare_social" style={{paddingLeft:0}}>
            For each person that enters a contest from your share, you'll get+1 extra entry point.
          </p>
        </div>
        <div className="text-center f_share_img_div f_share_img_div_second">
          <img
            src={api.image_path+"btn-familyshare.jpg"}
            alt=""
            title=""
            className="fs_img"
          />
          <p className="pare_social" style={{paddingLeft:0}}>
            For every family member that enters because of your family share. you'll get+1 extra entry point.
          </p>
        </div>
        <div className="inner_container familyshare_innercontainer">
          <div className="welcome_txt2 family_share_orientation_div m_t10 text-center">
            Increase your chance of winning with <b>Family Share</b>
          </div>
          <p className="page-txt m_t10">
            What to increase your odds of winning a contest? Go back and share.
            For each person that enters a contest from your share, you’ll get +1
            extra entry point, and for every family member that enters because
            of your family share, you’ll get +2 extra entry points
          </p>
          <div className="m_t20">
            <a
              onClick={() => {localStorage.setItem("current_state", "share"),this.props.history.push("/share")}}
              className="white-btn px20 py20 fs1_whitebtn"
            >
              <span>
                Build my Family Share Network{" "}
                <i>
                  <img
                    src={api.image_path+"next_arrow.jpg"}
                    alt=""
                    title=""
                    width="30"
                  />
                </i>
              </span>
            </a>
          </div>
          <div className="m_t20" />
        </div>
      </div>
    );
  }
}
export default family_share_orientation;
