Skip to content

Commit

Permalink
Make facilityMiddlewareHostname as a state (#6753)
Browse files Browse the repository at this point in the history
  • Loading branch information
khavinshankar authored Nov 29, 2023
1 parent bf4920c commit 9b2d947
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Components/Facility/Consultations/Feed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ export const Feed: React.FC<IFeedProps> = ({ consultationId, facilityId }) => {
const [isFullscreen, setFullscreen] = useFullscreen();
const [videoStartTime, setVideoStartTime] = useState<Date | null>(null);
const [statusReported, setStatusReported] = useState(false);
const [facilityMiddlewareHostname, setFacilityMiddlewareHostname] =
useState("");
const authUser = useAuthUser();

let facilityMiddlewareHostname = "";

useQuery(routes.getPermittedFacility, {
pathParams: { id: facilityId || "" },
onResponse: ({ res, data }) => {
if (res && res.status === 200 && data && data.middleware_address) {
facilityMiddlewareHostname = data.middleware_address;
setFacilityMiddlewareHostname(data.middleware_address);
}
},
});
Expand Down

0 comments on commit 9b2d947

Please sign in to comment.