diff --git a/apps/web/app/(app)/environments/[environmentId]/actions/components/ActionActivityTab.tsx b/apps/web/app/(app)/environments/[environmentId]/actions/components/ActionActivityTab.tsx index 603e959810..c8e0180415 100644 --- a/apps/web/app/(app)/environments/[environmentId]/actions/components/ActionActivityTab.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/actions/components/ActionActivityTab.tsx @@ -20,14 +20,14 @@ interface ActivityTabProps { actionClass: TActionClass; environmentId: string; environment: TEnvironment; - toCopyActionClasses: TActionClass[]; + otherEnvActionClasses: TActionClass[]; otherEnvironment: TEnvironment; isReadOnly: boolean; } export const ActionActivityTab = ({ actionClass, - toCopyActionClasses, + otherEnvActionClasses, otherEnvironment, environmentId, environment, @@ -60,17 +60,17 @@ export const ActionActivityTab = ({ }, [actionClass.id, environmentId]); const actionClassNames = useMemo( - () => toCopyActionClasses.map((actionClass) => actionClass.name), - [toCopyActionClasses] + () => otherEnvActionClasses.map((actionClass) => actionClass.name), + [otherEnvActionClasses] ); const actionClassKeys = useMemo(() => { - const codeActionClasses: TActionClassInputCode[] = toCopyActionClasses.filter( + const codeActionClasses: TActionClassInputCode[] = otherEnvActionClasses.filter( (actionClass) => actionClass.type === "code" ) as TActionClassInputCode[]; return codeActionClasses.map((actionClass) => actionClass.key); - }, [toCopyActionClasses]); + }, [otherEnvActionClasses]); const copyAction = async (data: TActionClassInput) => { const { type } = data; diff --git a/apps/web/app/(app)/environments/[environmentId]/actions/components/ActionClassesTable.tsx b/apps/web/app/(app)/environments/[environmentId]/actions/components/ActionClassesTable.tsx index a3fa105d56..959cb1842a 100644 --- a/apps/web/app/(app)/environments/[environmentId]/actions/components/ActionClassesTable.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/actions/components/ActionClassesTable.tsx @@ -12,7 +12,7 @@ interface ActionClassesTableProps { children: [JSX.Element, JSX.Element[]]; isReadOnly: boolean; otherEnvironment: TEnvironment; - toCopyActionClasses: TActionClass[]; + otherEnvActionClasses: TActionClass[]; } export const ActionClassesTable = ({ @@ -21,7 +21,7 @@ export const ActionClassesTable = ({ environment, children: [TableHeading, actionRows], isReadOnly, - toCopyActionClasses, + otherEnvActionClasses, otherEnvironment, }: ActionClassesTableProps) => { const [isActionDetailModalOpen, setActionDetailModalOpen] = useState(false); @@ -61,7 +61,7 @@ export const ActionClassesTable = ({ actionClasses={actionClasses} actionClass={activeActionClass} isReadOnly={isReadOnly} - toCopyActionClasses={toCopyActionClasses} + otherEnvActionClasses={otherEnvActionClasses} otherEnvironment={otherEnvironment} /> )} diff --git a/apps/web/app/(app)/environments/[environmentId]/actions/components/ActionDetailModal.tsx b/apps/web/app/(app)/environments/[environmentId]/actions/components/ActionDetailModal.tsx index 1c69aa2f67..7a220d97bd 100644 --- a/apps/web/app/(app)/environments/[environmentId]/actions/components/ActionDetailModal.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/actions/components/ActionDetailModal.tsx @@ -15,7 +15,7 @@ interface ActionDetailModalProps { actionClasses: TActionClass[]; isReadOnly: boolean; otherEnvironment: TEnvironment; - toCopyActionClasses: TActionClass[]; + otherEnvActionClasses: TActionClass[]; } export const ActionDetailModal = ({ @@ -26,7 +26,7 @@ export const ActionDetailModal = ({ actionClasses, environment, isReadOnly, - toCopyActionClasses, + otherEnvActionClasses, otherEnvironment, }: ActionDetailModalProps) => { const t = useTranslations(); @@ -35,7 +35,7 @@ export const ActionDetailModal = ({ title: t("common.activity"), children: ( { const otherEnvironment = environments.filter((env) => env.id !== params.environmentId)[0]; - const toCopyActionClasses = await getActionClasses(otherEnvironment.id); + const otherEnvActionClasses = await getActionClasses(otherEnvironment.id); const currentUserMembership = await getMembershipByUserIdOrganizationId(session?.user.id, organization.id); const { isMember, isBilling } = getAccessFlags(currentUserMembership?.role); @@ -83,7 +83,7 @@ const Page = async ({ params }) => {