@c-shell/spotify-api-hook
Advanced tools
Comparing version 1.4.0 to 1.4.1
@@ -96,8 +96,14 @@ "use strict"; | ||
var _useState3 = (0, _react.useState)(), | ||
var _useState3 = (0, _react.useState)(true), | ||
_useState4 = _slicedToArray(_useState3, 2), | ||
userAccessToken = _useState4[0], | ||
setUserAccessToken = _useState4[1]; | ||
isLoading = _useState4[0], | ||
setIsLoading = _useState4[1]; | ||
var _useState5 = (0, _react.useState)(), | ||
_useState6 = _slicedToArray(_useState5, 2), | ||
userAccessToken = _useState6[0], | ||
setUserAccessToken = _useState6[1]; | ||
(0, _react.useEffect)(function () { | ||
// setIsLoading(true) | ||
var clearUrlQueryParams = function clearUrlQueryParams() { | ||
@@ -146,2 +152,4 @@ return history.replace(pathame); | ||
} | ||
setIsLoading(false); | ||
}, [returnedAuthRequestTime, spotifyErrorCode, newUserAccessToken, expiresIn, history, pathame]); | ||
@@ -179,3 +187,4 @@ var isAuthed = !!userAccessToken; | ||
error: error, | ||
fetchData: fetchData | ||
fetchData: fetchData, | ||
isLoading: isLoading | ||
} | ||
@@ -193,3 +202,4 @@ }, children); | ||
isAuthed = _useContext.isAuthed, | ||
fetchData = _useContext.fetchData; | ||
fetchData = _useContext.fetchData, | ||
isLoading = _useContext.isLoading; | ||
@@ -201,3 +211,4 @@ return { | ||
isAuthed: isAuthed, | ||
fetchData: fetchData | ||
fetchData: fetchData, | ||
isLoading: isLoading | ||
}; | ||
@@ -204,0 +215,0 @@ }; |
@@ -75,8 +75,14 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } | ||
var _useState3 = useState(), | ||
var _useState3 = useState(true), | ||
_useState4 = _slicedToArray(_useState3, 2), | ||
userAccessToken = _useState4[0], | ||
setUserAccessToken = _useState4[1]; | ||
isLoading = _useState4[0], | ||
setIsLoading = _useState4[1]; | ||
var _useState5 = useState(), | ||
_useState6 = _slicedToArray(_useState5, 2), | ||
userAccessToken = _useState6[0], | ||
setUserAccessToken = _useState6[1]; | ||
useEffect(function () { | ||
// setIsLoading(true) | ||
var clearUrlQueryParams = function clearUrlQueryParams() { | ||
@@ -121,2 +127,4 @@ return history.replace(pathame); | ||
} | ||
setIsLoading(false); | ||
}, [returnedAuthRequestTime, spotifyErrorCode, newUserAccessToken, expiresIn, history, pathame]); | ||
@@ -154,3 +162,4 @@ var isAuthed = !!userAccessToken; | ||
error: error, | ||
fetchData: fetchData | ||
fetchData: fetchData, | ||
isLoading: isLoading | ||
} | ||
@@ -165,3 +174,4 @@ }, children); | ||
isAuthed = _useContext.isAuthed, | ||
fetchData = _useContext.fetchData; | ||
fetchData = _useContext.fetchData, | ||
isLoading = _useContext.isLoading; | ||
@@ -173,4 +183,5 @@ return { | ||
isAuthed: isAuthed, | ||
fetchData: fetchData | ||
fetchData: fetchData, | ||
isLoading: isLoading | ||
}; | ||
}; |
{ | ||
"name": "@c-shell/spotify-api-hook", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"description": "A hook for easily setup and use of the spotify API", | ||
@@ -5,0 +5,0 @@ "main": "cjs/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22254
362