From 2c9703ff8592cfc6b21e04d0669e82eab76df9e5 Mon Sep 17 00:00:00 2001 From: Mihaela-Ioana Mot <32430018+mmioana@users.noreply.github.com> Date: Tue, 29 Oct 2024 09:44:31 +0100 Subject: [PATCH] Fix: Realign master with changes from #3421 Fix: Realign master with changes from #3421 --- .../ActionSidebarContent.tsx | 54 ++----------------- .../partials/ActionSidebarContent/types.ts | 6 +-- 2 files changed, 6 insertions(+), 54 deletions(-) diff --git a/src/components/v5/common/ActionSidebar/partials/ActionSidebarContent/ActionSidebarContent.tsx b/src/components/v5/common/ActionSidebar/partials/ActionSidebarContent/ActionSidebarContent.tsx index 23245d3805a..d10a51c9b98 100644 --- a/src/components/v5/common/ActionSidebar/partials/ActionSidebarContent/ActionSidebarContent.tsx +++ b/src/components/v5/common/ActionSidebar/partials/ActionSidebarContent/ActionSidebarContent.tsx @@ -35,14 +35,12 @@ import NotificationBanner from '~v5/shared/NotificationBanner/NotificationBanner import ActionButtons from '../ActionButtons.tsx'; import ActionSidebarDescription from '../ActionSidebarDescription/ActionSidebarDescription.tsx'; import CreateStakedExpenditureModal from '../CreateStakedExpenditureModal/CreateStakedExpenditureModal.tsx'; -import Motions from '../Motions/index.ts'; import RemoveDraftModal from '../RemoveDraftModal/RemoveDraftModal.tsx'; import { useGetFormActionErrors } from './hooks.ts'; import { MultiSigMembersError } from './partials/MultiSigMembersError/MultiSigMembersError.tsx'; import NoPermissionsError from './partials/NoPermissionsError.tsx'; import NoReputationError from './partials/NoReputationError.tsx'; -import PermissionSidebar from './partials/PermissionSidebar.tsx'; import { SidebarBanner } from './partials/SidebarBanner.tsx'; import { type ActionSidebarContentProps, @@ -53,7 +51,6 @@ const displayName = 'v5.common.ActionsContent.partials.ActionSidebarContent'; const ActionSidebarFormContent: FC = ({ getFormOptions, - isMotion, actionFormProps: { primaryButton }, }) => { const { colony } = useColonyContext(); @@ -217,7 +214,7 @@ const ActionSidebarFormContent: FC = ({ ) : null} - {!isMotion && !readonly && ( + {!readonly && (
= ({ }; const ActionSidebarContent: FC = ({ - transactionId, formRef, defaultValues, - isMotion, }) => { - const { getFormOptions, actionFormProps } = useActionFormProps( - defaultValues, - !!transactionId, - ); + const { getFormOptions, actionFormProps } = useActionFormProps(defaultValues); const client = useApolloClient(); return ( -
-
+
+
= ({ >
- {transactionId && ( -
- {isMotion ? ( - - ) : ( - - )} -
- )}
); }; diff --git a/src/components/v5/common/ActionSidebar/partials/ActionSidebarContent/types.ts b/src/components/v5/common/ActionSidebar/partials/ActionSidebarContent/types.ts index 8569f59c87e..7c6c00697e8 100644 --- a/src/components/v5/common/ActionSidebar/partials/ActionSidebarContent/types.ts +++ b/src/components/v5/common/ActionSidebar/partials/ActionSidebarContent/types.ts @@ -1,12 +1,10 @@ import { type UseFormReturn } from 'react-hook-form'; import { type ActionFormProps } from '~shared/Fields/Form/index.ts'; +import { type ColonyAction } from '~types/graphql.ts'; import { type ActionFormBaseProps } from '~v5/common/ActionSidebar/types.ts'; export interface ActionSidebarFormContentProps extends ActionFormBaseProps { - isMotion?: boolean; - transactionId?: string; - isExpenditure?: boolean; actionFormProps: Omit; } @@ -18,5 +16,5 @@ export interface ActionSidebarContentProps { } export interface PermissionSidebarProps { - transactionId: string; + action: ColonyAction; }