Skip to content

Commit

Permalink
feat: remove showactive flag
Browse files Browse the repository at this point in the history
  • Loading branch information
BiswaViraj committed Sep 11, 2023
1 parent af2dded commit 0170567
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,7 @@ const CopyWrapper = styled.div`
}
`;

export const UpdateIntegrationCommonFields = ({
provider,
showActive = true,
}: {
provider: IIntegratedProvider | null;
showActive?: boolean;
}) => {
export const UpdateIntegrationCommonFields = ({ provider }: { provider: IIntegratedProvider | null }) => {
const {
control,
formState: { errors },
Expand All @@ -31,21 +25,19 @@ export const UpdateIntegrationCommonFields = ({

return (
<>
<When truthy={showActive}>
<Controller
control={control}
name="active"
defaultValue={false}
render={({ field }) => (
<Switch
checked={field.value}
label={field.value ? 'Active' : 'Disabled'}
data-test-id="is_active_id"
{...field}
/>
)}
/>
</When>
<Controller
control={control}
name="active"
defaultValue={false}
render={({ field }) => (
<Switch
checked={field.value}
label={field.value ? 'Active' : 'Disabled'}
data-test-id="is_active_id"
{...field}
/>
)}
/>
<Controller
control={control}
name="name"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ export function UpdateProviderSidebar({
}
>
<NovuProviderSidebarContent provider={selectedProvider} />
<UpdateIntegrationCommonFields provider={selectedProvider} showActive={true} />
<UpdateIntegrationCommonFields provider={selectedProvider} />
</Sidebar>
<SelectPrimaryIntegrationModal />
</FormProvider>
Expand Down

0 comments on commit 0170567

Please sign in to comment.