Skip to content

Commit

Permalink
chore: make linter happy
Browse files Browse the repository at this point in the history
  • Loading branch information
JGAntunes committed Oct 11, 2024
1 parent dd6f443 commit 8000c68
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 49 deletions.
66 changes: 33 additions & 33 deletions web/src/components/upgrade_service/ConfirmAndDeploy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,39 @@ interface PreflightResultResponse {
showWarn: boolean;
}

const BackButton = ({
slug,
hasPreflight,
isConfigurable,
}: {
slug: string;
hasPreflight: boolean;
isConfigurable: boolean;
}) => {
const navigate = useNavigate();

if (hasPreflight) {
return (
<button
className="btn secondary blue"
onClick={() => navigate(`/upgrade-service/app/${slug}/preflight`)}
>
Back: Preflight checks
</button>
);
}

return (
<button
className="btn secondary blue"
onClick={() => navigate(`/upgrade-service/app/${slug}/config`)}
disabled={!isConfigurable}
>
Back: Config
</button>
);
};

const ConfirmAndDeploy = ({
setCurrentStep,
hasPreflight,
Expand Down Expand Up @@ -352,37 +385,4 @@ const ConfirmAndDeploy = ({
);
};

const BackButton = ({
slug,
hasPreflight,
isConfigurable,
}: {
slug: string;
hasPreflight: boolean;
isConfigurable: boolean;
}) => {
const navigate = useNavigate();

if (hasPreflight) {
return (
<button
className="btn secondary blue"
onClick={() => navigate(`/upgrade-service/app/${slug}/preflight`)}
>
Back: Preflight checks
</button>
);
}

return (
<button
className="btn secondary blue"
onClick={() => navigate(`/upgrade-service/app/${slug}/config`)}
disabled={!isConfigurable}
>
Back: Config
</button>
);
};

export default ConfirmAndDeploy;
32 changes: 16 additions & 16 deletions web/src/components/upgrade_service/UpgradeService.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,6 @@ import { useGetUpgradeInfo } from "./hooks";
// react-query client
const queryClient = new QueryClient();

const UpgradeService = () => {
return (
<QueryClientProvider client={queryClient}>
<Helmet>
<meta
httpEquiv="Cache-Control"
content="no-cache, no-store, must-revalidate"
/>
<meta httpEquiv="Pragma" content="no-cache" />
<meta httpEquiv="Expires" content="0" />
</Helmet>
<UpgradeServiceBody />
</QueryClientProvider>
);
};

const UpgradeServiceBody = () => {
const Crashz = () => {
throw new Error("Crashz!");
Expand Down Expand Up @@ -125,4 +109,20 @@ const UpgradeServiceBody = () => {
);
};

const UpgradeService = () => {
return (
<QueryClientProvider client={queryClient}>
<Helmet>
<meta
httpEquiv="Cache-Control"
content="no-cache, no-store, must-revalidate"
/>
<meta httpEquiv="Pragma" content="no-cache" />
<meta httpEquiv="Expires" content="0" />
</Helmet>
<UpgradeServiceBody />
</QueryClientProvider>
);
};

export { UpgradeService };

0 comments on commit 8000c68

Please sign in to comment.