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
/** | |
* This is the highest level hook for making HTTP requests. It's just a wrapper for basic HTTP requests. | |
*/ | |
function useAxios() { | |
const [isLoading, setIsLoading] = React.useState(false); | |
const { getAccessTokenSilently } = useAuth0(); | |
axios.defaults.baseURL = process.env.REACT_APP_BASE_URL; | |
const getRequest = async (url) => { |
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
{ | |
"Generate firebase environment variables": { | |
"prefix": "fireenv", | |
"body": [ | |
"REACT_APP_FIREBASE_API_KEY=${1}", | |
"REACT_APP_FIREBASE_AUTH_DOMAIN=${2}", | |
"REACT_APP_FIREBASE_PROJECT_ID=${3}", | |
"REACT_APP_FIREBASE_STORAGE_BUCKET=${4}", | |
"REACT_APP_FIREBASE_MESSAGING_SENDER_ID=${5}", | |
"REACT_APP_FIREBASE_APP_ID=${6}" |
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 p = 250000 - (20 / 100) * 250000; | |
console.log('calcMonthlyRepayment -> p', p); | |
// monthly intrest | |
let i = (5 / 100 / 12).toFixed(6); | |
console.log('calcMonthlyRepayment -> i', i); | |
// number of periods (months) | |
let n = 30 * 12; | |
console.log('calcMonthlyRepayment -> n', n); |
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
/* eslint-disable no-unneeded-ternary */ | |
import React, { Component } from 'react'; | |
import propTypes from 'prop-types'; | |
import { withTheme } from 'styled-components'; | |
import { connect } from 'react-redux'; | |
import { Formik, ErrorMessage } from 'formik'; | |
import Wizard from '../../../components/Wizard'; | |
import { RegistrationContainer } from '../../../components/Containers'; | |
import Headings from '../../../components/Headings'; | |
import Input from '../../../components/Inputs/Text'; |