mirror of
https://github.com/formbricks/formbricks.git
synced 2026-01-04 04:40:37 -06:00
fix: rename variabl;es
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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}
|
||||
/>
|
||||
)}
|
||||
|
||||
@@ -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: (
|
||||
<ActionActivityTab
|
||||
toCopyActionClasses={toCopyActionClasses}
|
||||
otherEnvActionClasses={otherEnvActionClasses}
|
||||
otherEnvironment={otherEnvironment}
|
||||
isReadOnly={isReadOnly}
|
||||
environment={environment}
|
||||
|
||||
@@ -54,7 +54,7 @@ const Page = async ({ params }) => {
|
||||
|
||||
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 }) => {
|
||||
<ActionClassesTable
|
||||
environment={currentEnvironment}
|
||||
otherEnvironment={otherEnvironment}
|
||||
toCopyActionClasses={toCopyActionClasses}
|
||||
otherEnvActionClasses={otherEnvActionClasses}
|
||||
environmentId={params.environmentId}
|
||||
actionClasses={actionClasses}
|
||||
isReadOnly={isReadOnly}>
|
||||
|
||||
Reference in New Issue
Block a user