apply stashed change before merge bradley

This commit is contained in:
2025-09-10 09:05:47 +01:00
parent 4fd3bd4319
commit db49221a2b
8 changed files with 21 additions and 34 deletions

View File

@@ -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]);