Created
January 19, 2020 14:13
-
-
Save theycallmeloki/ece81696c46624f8a6615173829970f2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component, lazy } from "react"; | |
import { Route, BrowserRouter as Router, Switch } from "react-router-dom"; | |
import "./App.css"; | |
import Live from "./Views/Live.js"; | |
import Home from "./Views/Home"; | |
import Contact from "./Views/contact"; | |
import Vision from "./Views/Vision"; | |
import Product from "./Views/Product"; | |
import Login from "./Views/login"; | |
import Projects from "./Views/Projects"; | |
import AddProject from "./Views/AddProject"; | |
import Account from "./Views/Accounts"; | |
import Amplify, { Auth } from "aws-amplify"; | |
import { withAuthenticator } from "aws-amplify-react"; | |
import awsconfig from "./amplify/aws-exports"; | |
import API from "@aws-amplify/api"; | |
import "bootstrap/dist/css/bootstrap.css"; | |
Amplify.configure({ | |
Auth: { | |
// REQUIRED - Amazon Cognito Identity Pool ID | |
identityPoolId: "ap-south-1:a405ac78-4c0e-4851-9ee1-d9d046f073ea", | |
// REQUIRED - Amazon Cognito Region | |
region: "ap-south-1", | |
// OPTIONAL - Amazon Cognito User Pool ID | |
userPoolId: "ap-south-1_rlWIFcHkg" | |
//appPoolId: "r5mcmnoo4c2l580dbf6qfjvkj" | |
// OPTIONAL - Amazon Cognito Web Client ID (26-char alphanumeric string) | |
//userPoolWebClientId: "a1b2c3d4e5f6g7h8i9j0k1l2m3" | |
}, | |
API: { | |
endpoints: [ | |
{ | |
name: "MyAPIGatewayAPI", | |
endpoint: "https://bsncl30p28.execute-api.ap-south-1.amazonaws.com/dev" | |
} | |
] | |
}, | |
Storage: { | |
AWSS3: { | |
bucket: "youx-dev-youxuploa-595829461961", //REQUIRED - Amazon S3 bucketyoux-dev-youxuploa-595829461961 | |
region: "ap-south-1" //OPTIONAL - Amazon service region | |
} | |
} | |
}); | |
const width = window.innerWidth; | |
const height = window.innerHeight; | |
class App extends Component { | |
constructor(props) { | |
super(props); | |
this.state = {}; | |
} | |
componentDidMount() {} | |
render() { | |
return ( | |
<Router> | |
<Switch> | |
<Route exact path="/" component={Home} /> | |
<Route exact path="/live" component={Live} /> | |
<Route path="/vision" component={Vision} /> | |
<Route path="/product" component={Product} /> | |
<Route path="/contact" component={Contact} /> | |
<Route path="/login" component={Login} /> | |
<Route path="/my_projects" component={Projects} /> | |
<Route path="/add_project" component={AddProject} /> | |
<Route path="/account" component={Account} /> | |
<Route exact path="/" component={Home} /> | |
{/* <Route path="/vendor_orders" component={Orders} /> */} | |
</Switch> | |
</Router> | |
); | |
} | |
} | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment