Skip to content

Commit

Permalink
Merge pull request #182 from persistenceOne/websitev4
Browse files Browse the repository at this point in the history
removed bannertop
  • Loading branch information
blackpanther1881 authored Jun 16, 2022
2 parents c647fae + c936064 commit e48f285
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 25 deletions.
35 changes: 35 additions & 0 deletions src/components/layout/BannerTop.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import React, {useState} from "react";
import Alert from "react-bootstrap/Alert";
import rightarrow from "../../assets/images1/right-arrow.svg";
import close from "../../assets/images1/close_icon.png";


const BannerTop = () => {
const [banner, setBanner] = useState(true);

const closeBanner = () => {
setBanner(false);
}
return (
<div className="container-fluid bannernav-section">
{banner ?
<div className="container">
<Alert className="nav-banner alert-dismissible">
<p>
<a href="https://t.me/Persistenceatconsensus" rel="noopener noreferrer"
target="_blank">
<span>Persistence is at Consensus 2022 </span>&emsp;
<img src={rightarrow} alt="arrow"/></a>
</p>
<img src={close} alt="close" className="close" onClick={closeBanner}/>
</Alert>
</div>
: null}


</div>

);
};

export default BannerTop;
28 changes: 3 additions & 25 deletions src/components/layout/Header.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import React, { useState, useEffect } from 'react';
import { NavLink, withRouter, Link } from 'react-router-dom';
import Alert from 'react-bootstrap/Alert'
import logo from '../../assets/images1/pstakesymbolblack.svg'
import rightarrow from '../../assets/images1/right-arrow.svg'
import close from '../../assets/images1/close_icon.png'
import logotwo from '../../assets/images1/logo.svg'
import {Nav, Navbar, NavDropdown} from "react-bootstrap";
import { useTranslation } from "react-i18next";
Expand Down Expand Up @@ -46,20 +43,18 @@ const socialList = [
];

const Header = () => {
const [banner, setBanner] = useState(true);
const [mobileMenu, setMobileMenu] = useState(false);
const [isActive, setIsActive] = useState(false);

const { t } = useTranslation();
useEffect(() => {
document.body.classList = "";
window.addEventListener("scroll", scrollNavigation, true);
setIsActive(current => !current);


}, []);
const closeBanner = () => {
setBanner(false);
setIsActive(current => !current);
}

const toggleMenu = () => {
// setIsOPen(!isOpen);
setMobileMenu(!mobileMenu);
Expand Down Expand Up @@ -115,23 +110,6 @@ const Header = () => {
return (
<React.Fragment>
<Navbar className="navbar-custom fixed-top" expand="lg" expanded={mobileMenu} id="nav-bar">
<div className="container-fluid bannernav-section">
{banner ?
<div className="container">
<Alert className="nav-banner alert-dismissible">
<p>
<a href="https://t.me/Persistenceatconsensus" rel="noopener noreferrer"
target="_blank">
<span>Persistence is at Consensus 2022 </span>&emsp;
<img src={rightarrow} alt="arrow"/></a>
</p>
<img src={close} alt="close" className="close" onClick={closeBanner}/>
</Alert>
</div>
: null}


</div>
<div className="container p-0">
<Navbar.Brand href="#home">
<NavLink to="/">
Expand Down

0 comments on commit e48f285

Please sign in to comment.