Commit 2a3678ae by OuiAtichat

start project add base

parent c4c566f4
......@@ -3,8 +3,11 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"bootstrap": "^4.3.1",
"firebase": "^6.3.3",
"node-sass": "^4.12.0",
"react": "^16.8.6",
"react-bootstrap": "^1.0.0-beta.10",
"react-dom": "^16.8.6",
"react-router-dom": "^5.0.1",
"react-scripts": "3.0.1"
......
......@@ -2,24 +2,22 @@ import React, { Component } from 'react';
import { BrowserRouter as Router, Route } from 'react-router-dom';
import PrivateRoute from './components/PrivateRoute';
import app from './firebase';
import Home from './Home';
import LogIn from './LogIn';
import Home from './Pages/Home';
import LogIn from './Pages/LogIn';
class App extends Component {
state = { loading: true, authenticated: false, user: null };
state = { loading: true, authenticated: false };
componentDidMount() {
app.auth().onAuthStateChanged(user => {
if (user) {
this.setState({
authenticated: true,
currentUser: user,
loading: false,
});
} else {
this.setState({
authenticated: false,
currentUser: null,
loading: false,
});
}
......
import React from 'react';
import app from './firebase';
import app from '../firebase';
const Home = () => {
const signOut = async () => {
......
import React, { Component } from 'react';
import LogInView from './LogInView';
import { withRouter } from 'react-router';
import app from '../firebase';
import app from '../../firebase';
class LogInContainer extends Component {
handleSignUp = async event => {
......
body {
margin: 0;
padding: 0;
font-family: sans-serif;
}
......@@ -2,6 +2,7 @@ import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import * as serviceWorker from './serviceWorker';
import './styles.scss';
ReactDOM.render(<App />, document.getElementById('root'));
......
// Override default variables before the import
// $body-bg: #000;
// Import Bootstrap and its default variables
@import '~bootstrap/scss/bootstrap.scss';
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment