Skip to content

Commit

Permalink
Merge pull request #87 from Rugute/main
Browse files Browse the repository at this point in the history
(chores) fixed location pickers
  • Loading branch information
Rugute authored Jun 20, 2024
2 parents 01757c9 + 1d98cff commit fbbfd1c
Show file tree
Hide file tree
Showing 3 changed files with 569 additions and 314 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@babel/core": "^7.11.6",
"@carbon/react": "~1.37.0",
"@ohri/openmrs-esm-ohri-commons-lib": "next",
"@openmrs/esm-framework": "^5.6.1-pre.1895",
"@openmrs/esm-framework": "^5.6.1-pre.1920",
"@openmrs/esm-patient-common-lib": "next",
"@playwright/test": "1.40.1",
"@swc/core": "^1.2.165",
Expand Down Expand Up @@ -74,7 +74,7 @@
"jest-cli": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"lint-staged": "^15.2.1",
"openmrs": "^5.6.1-pre.1895",
"openmrs": "^5.6.1-pre.1920",
"prettier": "^3.1.1",
"react": "^18.1.0",
"react-dom": "^18.1.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/esm-report-app/src/location/location.resource.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const password = '';
const basicAuthBase64 = Buffer.from(`${username}:${password}`).toString('base64');
const fetcher = async (url) => {
try {
const response = await fetch(url, {
const response = await openmrsFetch(url, {
headers: { Authorization: `Basic ${basicAuthBase64}` },
});
if (!response.ok) {
Expand All @@ -24,7 +24,7 @@ const fetcher = async (url) => {
export const useFacilityLocation = () => {
const { basicAuthBase64 } = useConfig<FacilityLocationsConfig>();

const url = `https://ngx.ampath.or.ke/amrs/ws/rest/v1/location?v=default`;
const url = `/ws/rest/v1/location?v=default`;
const { data, isLoading, error, isValidating } = useSWR(url, () => fetcher(url));

return {
Expand Down
Loading

0 comments on commit fbbfd1c

Please sign in to comment.