Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. class Footer extends Component {
  2. constructor(props) {
  3. super(props);
  4. this.state = {
  5. privacyVisibile: false
  6. };
  7. this.togglePrivacyVisible = this.togglePrivacyVisible.bind(this)
  8. }
  9.  
  10. togglePrivacyVisible = () => {
  11. const { privacyVisibile } = this.state;
  12. this.setState({ privacyVisibile : !privacyVisibile })
  13. }
  14.  
  15. render() {
  16. return (
  17. <div>
  18. {this.state.privacyVisibile && <Privacy />}
  19. <ul className="footer-menu">
  20. <li><a href="about.html">About</a></li>
  21. <li><a href="privacy.html" onClick=
  22. {this.togglePrivacyVisible}>Privacy</a></li>
  23. </ul>
  24. </div>
  25. )
  26. }
  27. }
  28.  
  29. export default Footer;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement