Skip to content

Commit

Permalink
Add: join consultation request in the JoinConsultation backdrop
Browse files Browse the repository at this point in the history
  • Loading branch information
georgipavlov-7DIGIT committed Sep 18, 2024
1 parent ec40f98 commit 7540b22
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/backdrops/JoinConsultation/JoinConsultation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ import { toast } from "react-toastify";
import { useNavigate } from "react-router-dom";

import { Backdrop, ButtonSelector } from "@USupport-components-library/src";
import { messageSvc, videoSvc } from "@USupport-components-library/services";
import {
messageSvc,
videoSvc,
providerSvc,
} from "@USupport-components-library/services";

import "./join-consultation.scss";

Expand Down Expand Up @@ -35,10 +39,16 @@ export const JoinConsultation = ({ isOpen, onClose, consultation }) => {
consultation.consultationId
);

const joinConsultationPromise = providerSvc.joinConsultation({
consultationId: consultation.consultationId,
userType: "client",
});

try {
const result = await Promise.all([
systemMessagePromise,
getConsultationTokenPromise,
joinConsultationPromise,
]);
const token = result[1].data.token;

Expand Down

0 comments on commit 7540b22

Please sign in to comment.