Astrix0x1

index.js

Sep 26th, 2021
849
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import React , { useState }from 'react';
  2. import { render } from 'react-dom';
  3. import Home from './Home';
  4. import LoginForm from './container/LoginForm.js';
  5. import CreateNewAccount from './container/CreateNewAccount.js';
  6. import LoginModal from './container/LoginModal.js';
  7.  
  8. import { Button, Modal} from 'react-bootstrap';
  9.  
  10. const styles = {
  11.   fontFamily: 'sans-serif',
  12.   textAlign: 'center',
  13. };
  14.  
  15.  
  16. const App = () =>  {
  17.   <LoginForm />
  18.    const[showmodel, setShowModel] = useState( false);
  19.    //const[form, setForm] = useState('')
  20.    
  21.  
  22.   const close = () => {
  23.     setShowModel ( false );
  24.   }
  25.  
  26.  
  27.  
  28.   const open = () => {
  29.     setShowModel ( true);
  30.   }
  31.  
  32.     //const isLoggedIn = this.state.isLoggedIn;
  33.    
  34.     return (
  35.       <div style={styles}>
  36.         {/*<Home  />*/}
  37.         <LoginModal />
  38.         <LoginForm  onClose = {close} />
  39.      </div>
  40.     );
  41.   }
  42.  
  43.  
  44. render(<App />, document.getElementById('root'));
  45.  
RAW Paste Data