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
'use strict'; // eslint-disable-line | |
/** | |
* Webpack configuration base class | |
*/ | |
const fs = require('fs'); | |
const path = require('path'); | |
const npmBase = path.join(__dirname, '../../node_modules'); |
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 from 'react'; | |
import { Route, withRouter, Switch, Router } from 'react-router-dom'; | |
import { connect } from 'react-redux'; | |
import 'jquery-slimscroll/jquery.slimscroll.min'; | |
import { toggleCollapsedNav } from '../actions/Setting'; | |
import Header from 'components/Header/index'; | |
import Sidebar from 'containers/SideNav/index'; | |
import Footer from 'components/Footer'; |
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
const renderField = ({ input, field }) => { | |
const { type, placeholder, name, value, ...props } = field; | |
const validate = applyRules(field.checkRules); | |
const divStyle = { | |
display: "block" | |
}; | |
if (type === "text" || type === "email" || type === "number") { | |
return ( |
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
const renderField = ({ input, field }) => { | |
const { type, placeholder, name, value, ...props } = field; | |
const validate = applyRules(field.checkRules); | |
const divStyle = { | |
display: "block" | |
}; | |
if (type === "text" || type === "email" || type === "number") { | |
return ( |
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
export const fetchPOSTLOGIN = creds => { | |
return dispatch => { | |
dispatch({ type: LOGIN_REQUEST, payload: true }); | |
login(creds) | |
.then(user => { | |
sessionStorage.setItem("token", user.token); | |
dispatch({ type: LOGIN_SUCCESS, payload: user.token }); | |
history.push(`/dashboard`); | |
}) | |
.catch(err => { |
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 } from "react"; | |
import "./App.css"; | |
import { Route, Switch, Router } from "react-router-dom"; | |
import Header from "../src/components/header/header"; | |
import SideBar from "../src/components/sidebar/sidebar"; | |
import Login from "./components/login/login.js"; | |
import Dashboard from "./components/dashboard/dashboard"; | |
import RequireAuth from "./components/utility/require-auth"; | |
import history from "./components/utility/history"; |
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 } from "react"; | |
import { connect } from "react-redux"; | |
import PropTypes from "prop-types"; | |
import history from '../../components/utility/history'; | |
export default function(ComposedComponent) { | |
class Authentication extends Component { | |
static contextTypes = { | |
router: PropTypes.object | |
}; |