From 87b6d05e5b289f3e9d1554fe455296ba09655c3a Mon Sep 17 00:00:00 2001
From: jloup <jeanloup.jamet@gmail.com>
Date: Sat, 5 May 2018 12:36:58 +0200
Subject: Factorize Header/Footer code.

---
 cmd/web/js/main.jsx | 37 -------------------------------------
 1 file changed, 37 deletions(-)

(limited to 'cmd/web/js/main.jsx')

diff --git a/cmd/web/js/main.jsx b/cmd/web/js/main.jsx
index 909f1bd..8a4fce8 100644
--- a/cmd/web/js/main.jsx
+++ b/cmd/web/js/main.jsx
@@ -10,35 +10,6 @@ import cookies from './cookies.js';
 import React from 'react';
 import qs from 'qs';
 
-class Header extends React.Component {
-  render = () => {
-    if (this.props.displayLogout === true) {
-      return <div id="header" className="row">
-                <div className="offset-4 col-4">
-                  <Logo />
-                </div>
-                <div className="offset-2 col-2 align-self-center h-100">
-                  <a href="/signout"><u>Logout</u></a>
-                </div>
-              </div>;
-    }
-      return <div id="header" className="row">
-                <div className="offset-4 col-4">
-                  <Logo />
-                </div>
-              </div>;
-
-  }
-}
-
-class Logo extends React.Component {
-  render() {
-    return <div id="logo" className="w-100 h-100 align-self-center">
-             <h1><a href="/">CryptoPF</a></h1>
-           </div>;
-  }
-}
-
 App.page('/signup', false, function(context) {
   if (App.isUserSignedIn()) {
     App.go('/me');
@@ -46,7 +17,6 @@ App.page('/signup', false, function(context) {
   }
 
   App.mount(<div>
-      <Header />
       <SignupForm onSuccess={App.onUserSignUp}/>
     </div>);
 });
@@ -58,7 +28,6 @@ App.page('/signin', false, function(context) {
   }
 
   App.mount(<div>
-      <Header />
       <SigninForm onSuccess={App.onUserSignIn}/>
     </div>);
 });
@@ -70,7 +39,6 @@ App.page('/reset-password', false, function(context) {
   }
 
   App.mount(<div>
-      <Header />
       <PasswordResetForm />
     </div>);
 });
@@ -89,7 +57,6 @@ App.page('/change-password', false, function(context) {
   }
 
   App.mount(<div>
-      <Header />
       <ChangePasswordForm token={token} onSuccess={App.go.bind(App, '/signin')}/>
     </div>);
 });
@@ -102,14 +69,12 @@ App.page('/signout', true, function(context) {
 
 App.page('/me', true, function(context) {
   App.mount(<div>
-      <Header displayLogout={true} />
       <PoloniexController/>
     </div>);
 });
 
 App.page('/not_confirmed', true, function(context) {
   App.mount(<div>
-      <Header displayLogout={true}/>
       <div className="row">
         <div className="box offset-3 col-6 text-center">
           <p>Please be patient, you account is being confirmed...</p>
@@ -127,7 +92,6 @@ App.page('/otp/setup', true, function(context) {
     }
 
     App.mount(<div>
-        <Header displayLogout={true}/>
         <OtpEnrollForm onSuccess={App.onUserValidateOtp} img={'data:image/png;base64,' + data.base64img} secret={data.secret}/>
       </div>);
 
@@ -136,7 +100,6 @@ App.page('/otp/setup', true, function(context) {
 
 App.page('/otp/validate', true, function(context) {
   App.mount(<div>
-      <Header displayLogout={true}/>
       <OtpEnrollForm onSuccess={App.onUserValidateOtp} />
     </div>);
 });
-- 
cgit v1.2.3

