fix: use useTeamsPlan hook (#8789)
* fix: use useTeamsPlan hook Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> * fix: z index bug on dialog Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> --------- Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in>
This commit is contained in:
@@ -2,7 +2,7 @@ import { useState, Suspense } from "react";
|
||||
|
||||
import dayjs from "@calcom/dayjs";
|
||||
import LicenseRequired from "@calcom/features/ee/common/components/LicenseRequired";
|
||||
import useHasPaidPlan from "@calcom/lib/hooks/useHasPaidPlan";
|
||||
import { useHasTeamPlan } from "@calcom/lib/hooks/useHasPaidPlan";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import type { RecordingItemSchema } from "@calcom/prisma/zod-utils";
|
||||
import type { RouterOutputs } from "@calcom/trpc/react";
|
||||
@@ -98,7 +98,7 @@ const useRecordingDownload = () => {
|
||||
};
|
||||
};
|
||||
|
||||
const ViewRecordingsList = ({ roomName, hasPaidPlan }: { roomName: string; hasPaidPlan: boolean }) => {
|
||||
const ViewRecordingsList = ({ roomName, hasTeamPlan }: { roomName: string; hasTeamPlan: boolean }) => {
|
||||
const { t } = useLocale();
|
||||
const { setRecordingId, isFetching, recordingId } = useRecordingDownload();
|
||||
|
||||
@@ -129,7 +129,7 @@ const ViewRecordingsList = ({ roomName, hasPaidPlan }: { roomName: string; hasPa
|
||||
</h1>
|
||||
<p className="text-subtle text-sm font-normal">{convertSecondsToMs(recording.duration)}</p>
|
||||
</div>
|
||||
{hasPaidPlan ? (
|
||||
{hasTeamPlan ? (
|
||||
<Button
|
||||
StartIcon={Download}
|
||||
className="ml-4 lg:ml-0"
|
||||
@@ -157,7 +157,7 @@ export const ViewRecordingsDialog = (props: IViewRecordingsDialog) => {
|
||||
const { t, i18n } = useLocale();
|
||||
const { isOpenDialog, setIsOpenDialog, booking, timeFormat } = props;
|
||||
|
||||
const { hasPaidPlan, isLoading: isTeamPlanStatusLoading } = useHasPaidPlan();
|
||||
const { hasTeamPlan, isLoading: isTeamPlanStatusLoading } = useHasTeamPlan();
|
||||
|
||||
const roomName =
|
||||
booking?.references?.find((reference: PartialReference) => reference.type === "daily_video")?.meetingId ??
|
||||
@@ -182,7 +182,7 @@ export const ViewRecordingsDialog = (props: IViewRecordingsDialog) => {
|
||||
<RecordingListSkeleton />
|
||||
) : (
|
||||
<Suspense fallback={<RecordingListSkeleton />}>
|
||||
<ViewRecordingsList hasPaidPlan={!!hasPaidPlan} roomName={roomName} />
|
||||
<ViewRecordingsList hasTeamPlan={!!hasTeamPlan} roomName={roomName} />
|
||||
</Suspense>
|
||||
)}
|
||||
</LicenseRequired>
|
||||
|
||||
@@ -33,7 +33,7 @@ export function Tooltip({
|
||||
className={classNames(
|
||||
side === "top" && "-mt-7",
|
||||
side === "right" && "ml-2",
|
||||
"bg-inverted text-inverted relative relative z-20 rounded-md px-2 py-1 text-xs font-semibold shadow-lg"
|
||||
"bg-inverted text-inverted relative relative z-50 rounded-md px-2 py-1 text-xs font-semibold shadow-lg"
|
||||
)}
|
||||
side={side}
|
||||
align="center"
|
||||
|
||||
Reference in New Issue
Block a user