consent disable feature (no-mistakes)

This commit is contained in:
Igor Loskutov
2025-12-18 11:14:02 -05:00
parent c62e3c0753
commit 129a19bcb5
10 changed files with 210 additions and 11 deletions

View File

@@ -8,6 +8,7 @@ import type { components } from "../../reflector-api";
import { useAuth } from "../../lib/AuthProvider";
import {
ConsentDialogButton,
RecordingIndicator,
recordingTypeRequiresConsent,
} from "../../lib/consent";
import { useRoomJoinMeeting } from "../../lib/apiHooks";
@@ -162,7 +163,12 @@ export default function DailyRoom({ meeting }: DailyRoomProps) {
<div ref={containerRef} style={{ width: "100%", height: "100%" }} />
{meeting.recording_type &&
recordingTypeRequiresConsent(meeting.recording_type) &&
meeting.id && <ConsentDialogButton meetingId={meeting.id} />}
meeting.id &&
(meeting.skip_consent ? (
<RecordingIndicator />
) : (
<ConsentDialogButton meetingId={meeting.id} />
))}
</Box>
);
}

View File

@@ -8,6 +8,7 @@ import { getWherebyUrl, useWhereby } from "../../lib/wherebyClient";
import { assertExistsAndNonEmptyString, NonEmptyString } from "../../lib/utils";
import {
ConsentDialogButton as BaseConsentDialogButton,
RecordingIndicator,
useConsentDialog,
recordingTypeRequiresConsent,
} from "../../lib/consent";
@@ -90,12 +91,15 @@ export default function WherebyRoom({ meeting }: WherebyRoomProps) {
/>
{recordingType &&
recordingTypeRequiresConsent(recordingType) &&
meetingId && (
meetingId &&
(meeting.skip_consent ? (
<RecordingIndicator />
) : (
<WherebyConsentDialogButton
meetingId={assertExistsAndNonEmptyString(meetingId)}
wherebyRef={wherebyRef}
/>
)}
))}
</>
);
}