Skip to content

Commit

Permalink
make facilityMiddlewareHostname as a state
Browse files Browse the repository at this point in the history
  • Loading branch information
khavinshankar committed Nov 29, 2023
1 parent bf4920c commit d5bf7c7
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 d5bf7c7

Please sign in to comment.