Skip to content

Commit

Permalink
module
Browse files Browse the repository at this point in the history
  • Loading branch information
SYEDMUNEEBBUKHARI committed Jun 9, 2020
1 parent aab76ff commit 64d04a2
Show file tree
Hide file tree
Showing 8 changed files with 942 additions and 1,135 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
/node_modules

# testing
/coverage
Expand All @@ -19,3 +17,4 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
node_modules
7 changes: 1 addition & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,7 @@
"start": "node scripts/start.js",
"build": "node scripts/build.js --history-api-fallback",
"test": "node scripts/test.js --env=jsdom"
}
,

},
"jest": {
"collectCoverageFrom": [
"src/**/*.{js,jsx,mjs}"
Expand Down Expand Up @@ -119,7 +117,4 @@
"eslintConfig": {
"extends": "react-app"
}
,
"proxy": "http://localhost:5000"

}
28 changes: 15 additions & 13 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#000000">
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<meta name="theme-color" content="#000000" />
<!--
manifest.json provides metadata used when your web app is added to the
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
<link rel="stylesheet" href="path/to/font-awesome/css/font-awesome.min.css">
<script src="https://kit.fontawesome.com/yourcode.js"></script>
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
<!-- <link rel="stylesheet" href="path/to/font-awesome/css/font-awesome.min.css">
<script src="https://kit.fontawesome.com/yourcode.js"></script> -->
<link
rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T"
crossorigin="anonymous"
/>
rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T"
crossorigin="anonymous"
/>


<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Expand Down
182 changes: 63 additions & 119 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,148 +1,92 @@
import React, { Component } from 'react';
import Nave from '../src/components/navbar/navbar'
import 'bootstrap/dist/css/bootstrap.min.css';
import React, { Component } from "react";
import Nave from "../src/components/navbar/navbar";
import "bootstrap/dist/css/bootstrap.min.css";
// import{Route,Router} from 'react-router'
import './App.css';
import Cont from '../src/components/container/contaner'
import Io from '../src/components/io/io'
import styled from 'styled-components';
import "./App.css";
import Cont from "../src/components/container/contaner";
import Io from "../src/components/io/io";
import styled from "styled-components";
import CityViewArrange from "./DASHBOARD/Cityportal/CityViewArrange";
import '../node_modules/font-awesome/css/font-awesome.min.css'
import Foott from '../src/components/footer/footer';
import "../node_modules/font-awesome/css/font-awesome.min.css";
import Foott from "../src/components/footer/footer";

// import axios from 'axios'

import WhyBlock from "../src/components/whyblock/whyblock";

import {Cube } from "styled-loaders-react";
import { Cube } from "styled-loaders-react";

import axios from 'axios';
import {Switch, Route} from "react-router-dom";
import Login from "./components/navbar/Login"
import axios from "axios";
import { Switch, Route } from "react-router-dom";
import Login from "./components/navbar/Login";

import Dash from "./DASHBOARD/dashboard"
import Register from "./components/navbar/Register"
import {Router as Router, Redirect} from 'react-router-dom';
import Routes from './Routes';
import Dash from "./DASHBOARD/dashboard";
import Register from "./components/navbar/Register";
import { Router, Redirect } from "react-router-dom";
import Routes from "./Routes";
import Company from "./DASHBOARD/company";
import history from './Services/history';
const Sylee=styled.div`
.reddd{
background-color: black;
}
`
import history from "./Services/history";
const Sylee = styled.div`
.reddd {
background-color: black;
}
`;
class App extends Component {






state={
state = {
loading: true,
isFlipped: true

}




componentDidMount(){
setTimeout(()=>{
this.setState({loading: false});
},3000)

axios.get(`http://localhost:5000/api`);
}
isFlipped: true,
};

componentDidMount() {
setTimeout(() => {
this.setState({ loading: false });
}, 3000);
}

render() {




return (

<Router history={history}>

<Sylee>

{this.state.loading ? <div className="load"><Cube color= '#0EAD69' /></div> :

<React.Fragment className='reddd'>



<Switch>

<Route exact path="/" component={Home} />
<Route path="/dashboard" component={Auth} />
<Route path="/companyportal" component={Company} />
<Route path="/cityviewportal" component={CityViewArrange} />




</Switch>















</React.Fragment>
}
</Sylee>
<Sylee>
{this.state.loading ? (
<div className="load">
<Cube color="#0EAD69" />
</div>
) : (
<React.Fragment>
<div className="reddd">
<Switch>
<Route exact path="/" component={Home} />
<Route path="/dashboard" component={Auth} />
<Route path="/companyportal" component={Company} />
<Route path="/cityviewportal" component={CityViewArrange} />
</Switch>
</div>
</React.Fragment>
)}
</Sylee>
</Router>

);
}
}
const Auth=()=>{


let tokens=localStorage.getItem('token');
if(tokens)
{
return <Route path="/dashboard" component={Dash} />

const Auth = () => {
let tokens = localStorage.getItem("token");
if (tokens) {
return <Route path="/dashboard" component={Dash} />;
} else {
return <Redirect to="/" />;
}
};

else{
return <Redirect to="/" />
}


const Home = () => (
<React.Fragment>
<Nave />

<Cont />
<WhyBlock />
<Io />


}

const Home=()=>(

<React.Fragment>
<Nave / >



<Cont / >
<WhyBlock />
<Io />

<Foott></Foott>
<Foott></Foott>
</React.Fragment>
);


export default App;
Loading

0 comments on commit 64d04a2

Please sign in to comment.