This file contains 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 from "react"; | |
import Routes from "./router"; | |
function App() { | |
return ( | |
<Routes /> | |
); | |
} | |
export default App; |
This file contains 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 from 'react' | |
import { | |
BrowserRouter as Router, | |
Switch, | |
Route, | |
Link, | |
} from "react-router-dom"; | |
import routes from './routes'; | |
import { PrivateRoute } from "./types.js"; |
This file contains 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 from "react"; | |
import { Redirect, Route } from "react-router-dom"; | |
export const PrivateRoute = ({ component: Component, ...rest }) => { | |
return ( | |
<Route | |
{...rest} | |
render={(props) => | |
localStorage.getItem("isAuth") === "true" ? ( | |
<Component {...props} /> |
This file contains 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 DashboardPage from "../pages/DashboardPage"; | |
import LoginPage from "../pages/LoginPage"; | |
import ProfilePage from "../pages/ProfilePage"; | |
const routes = { | |
private: [ | |
{ | |
path: "/", | |
name: "dashboard", | |
component: DashboardPage |
This file contains 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 from "react"; | |
import { | |
BrowserRouter as Router, | |
Switch, | |
Route, | |
Link | |
} from "react-router-dom"; | |
// pages | |
import LoginPage from './pages/LoginPage' | |
import DashboardPage from './pages/DashboardPage' |
This file contains 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 from 'react' | |
const DashboardPage = () => { | |
return ( | |
<div> | |
Private Dashsboard | |
</div> | |
) | |
} |
This file contains 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
{ | |
"env": { | |
"browser": true, | |
"es6": true | |
}, | |
"extends": [ | |
"airbnb" | |
], | |
"globals": { | |
"Atomics": "readonly", |
This file contains 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
module.exports = { | |
development: { | |
client: 'postgresql', | |
connection: { | |
port: process.env.DATABASE_PORT, | |
host: process.env.DATABASE_HOST, | |
database: process.env.DATABASE_NAME, | |
user: process.env.DATABASE_USER, | |
password: process.env.DATABASE_ACCESS_KEY, | |
}, |
This file contains 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
La estructura para los proyectos en el servidor de Staging estan de la siguiente manera: | |
Repositorios | |
Aquí se definen los espejos (–mirror) de los repositorios de bitbucket. | |
/home/ubuntu/repos | |
Para ir a esta carpeta desde cualquier sitio del servidor se ingresa el comando: |
This file contains 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
{ | |
"extends": "airbnb", | |
"parser": "babel-eslint", | |
"env": { | |
"browser": true | |
}, | |
"plugins": [ | |
"react" | |
], | |
"rules": { |
NewerOlder