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 { useEffect } from 'react'; | |
import axios from 'axios'; | |
/** | |
* @description Hooks an axios error interceptor for your react application | |
*/ | |
const useErrorHandler = () => { | |
const errorInterceptor = axios.interceptors.response.use( | |
res => res, |
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 { useRef } from 'react'; | |
import debounce from 'lodash/debounce'; | |
import PropTypes from 'prop-types'; | |
function useDebounce(customFunction, t = 500) { | |
const debouncedFunction = useRef(debounce(customFunction, t)).current; | |
return debouncedFunction; | |
} |
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
{ | |
"tabWidth": 2, | |
"useTabs": false, | |
"singleQuote": true, | |
"semi": true, | |
"bracketSpacing": true, | |
"printWidth": 120 | |
} |
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
/* | |
##Device = Desktops | |
##Screen = 1281px to higher resolution desktops | |
*/ | |
@media (min-width: 1281px) { | |
//CSS | |