apply stashed change before merge bradley
This commit is contained in:
@@ -8,8 +8,7 @@ async function fetchNPEDDetails() {
|
||||
const fetchUrl = `${base_url}/fetch-config?id=NPED`;
|
||||
const response = await fetch(fetchUrl);
|
||||
if (!response.ok) throw new Error("Cannot reach fetch-config endpoint");
|
||||
const data = await response.json();
|
||||
console.log(data);
|
||||
|
||||
return response.json();
|
||||
}
|
||||
|
||||
@@ -99,10 +98,7 @@ export const useNPEDAuth = () => {
|
||||
useEffect(() => {
|
||||
if (fetchdataQuery.isSuccess && fetchdataQuery.data) {
|
||||
setUser(fetchdataQuery.data);
|
||||
} else if (
|
||||
!fetchdataQuery?.data?.propUsername?.value &&
|
||||
!fetchdataQuery?.data?.propClientID?.value
|
||||
) {
|
||||
} else {
|
||||
setUser(null);
|
||||
}
|
||||
}, [fetchdataQuery.data, fetchdataQuery.isSuccess, setUser]);
|
||||
|
||||
Reference in New Issue
Block a user