Refactor provisioning components for improved readability

- Simplified the import statement in HomePage.tsx by removing unnecessary line breaks.
- Consolidated props in the SynchronizeStep component for cleaner code.
- Enhanced the layout of the ProvisioningWizard component by streamlining the rendering of the SynchronizeStep.
This commit is contained in:
Roberto Jimenez Sanchez committed 2025-12-10 16:34:29 +01:00
1 parent ef793839ab
commit a09e667500
3 files changed
+3 -11

No files matched your search

@@ -2,9 +2,7 @@ import { useMemo, useState } from 'react';
import { t } from '@grafana/i18n';
import { ConfirmModal, Stack, Tab, TabContent, TabsBar } from '@grafana/ui';
import {
useDeletecollectionRepositoryMutation,
} from 'app/api/clients/provisioning/v0alpha1';
import { useDeletecollectionRepositoryMutation } from 'app/api/clients/provisioning/v0alpha1';
import { Page } from 'app/core/components/Page/Page';
import GettingStarted from './GettingStarted/GettingStarted';
@@ -415,10 +415,7 @@ export const ProvisioningWizard = memo(function ProvisioningWizard({
{activeStep === 'connection' && <ConnectStep />}
{activeStep === 'bootstrap' && <BootstrapStep settingsData={settingsData} repoName={repoName} />}
{activeStep === 'synchronize' && (
<SynchronizeStep
onCancel={handleRepositoryDeletion}
isCancelling={isCancelling}
/>
<SynchronizeStep onCancel={handleRepositoryDeletion} isCancelling={isCancelling} />
)}
{activeStep === 'finish' && <FinishStep />}
</div>
@@ -19,10 +19,7 @@ export interface SynchronizeStepProps {
isCancelling?: boolean;
}
export const SynchronizeStep = memo(function SynchronizeStep({
onCancel,
isCancelling,
}: SynchronizeStepProps) {
export const SynchronizeStep = memo(function SynchronizeStep({ onCancel, isCancelling }: SynchronizeStepProps) {
const { watch } = useFormContext<WizardFormData>();
const { setStepStatusInfo } = useStepStatus();
const [repoName = '', migrateExistingResources] = watch(['repositoryName', 'migrate.migrateExistingResources']);