Skip to content

Commit

Permalink
fix: no pagination for recorder
Browse files Browse the repository at this point in the history
  • Loading branch information
jibon57 committed Jan 22, 2025
1 parent 84cf381 commit e541219
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions src/components/media-elements/videos/videosComponentElms.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const VideosComponentElms = ({
(state) => state.bottomIconsActivity.isEnabledExtendedVerticalCamView,
);
const deviceType = store.getState().session.userDeviceType;
const isRecorder = store.getState().session.currentUser?.isRecorder;

const [participantsToRender, setParticipantsToRender] = useState<
Array<React.JSX.Element>
Expand Down Expand Up @@ -150,22 +151,22 @@ const VideosComponentElms = ({
// then only have next
// so, we'll deduct per page by 1
// and insert pagination in that slot
// if (!isVertical) {
per_page--;
// }
if (!isRecorder) {
per_page--;
}
hasNextPage = true;
} else {
hasPrevPage = true;
// if (!isVertical) {
per_page--;
// }
if (!isRecorder) {
per_page--;
}
// so, we're in next page
if (page_number >= totalNumWebcams / per_page) {
hasNextPage = false;
} else {
// if (!isVertical) {
per_page--;
// }
if (!isRecorder) {
per_page--;
}
hasNextPage = true;
}
}
Expand All @@ -175,7 +176,7 @@ const VideosComponentElms = ({
page_number * per_page,
);

if (hasNextPage) {
if (!isRecorder && hasNextPage) {
display.push(
<button
role="button"
Expand All @@ -186,7 +187,7 @@ const VideosComponentElms = ({
</button>,
);
}
if (hasPrevPage) {
if (!isRecorder && hasPrevPage) {
display.splice(
0,
0,
Expand Down

0 comments on commit e541219

Please sign in to comment.