Skip to content

Commit 507f41f

Browse files
committed
chore: fix build errors
1 parent 95d1d42 commit 507f41f

File tree

4 files changed

+15
-18
lines changed

4 files changed

+15
-18
lines changed

src/components/Integrations/Add/AddIntegrationModal.tsx

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ import { atom, useAtom } from "jotai";
22
import { useCallback, useEffect, useState } from "react";
33
import { AiFillPlusCircle } from "react-icons/ai";
44
import AddIntegrationForm from "./AddIntegrationForm";
5-
import AddIntegrationOptionsList, { IntegrationOption } from "./steps/AddIntegrationOptionsList";
5+
import AddIntegrationOptionsList, {
6+
IntegrationOption
7+
} from "./steps/AddIntegrationOptionsList";
68
import clsx from "clsx";
79
import { Modal } from "@flanksource-ui/components";
810

@@ -23,7 +25,6 @@ export default function AddIntegrationModal({ refresh }: Props) {
2325
}
2426
}, [isOpen]);
2527

26-
2728
const onSelectOption = useCallback(
2829
(option: IntegrationOption) => {
2930
setSelectedOption(option);
@@ -56,19 +57,17 @@ export default function AddIntegrationModal({ refresh }: Props) {
5657
onClose={() => {
5758
setIsOpen(false);
5859
}}
59-
onBack={() =>
60-
setSelectedOption(undefined)
61-
}
62-
onSave={(values) => {
63-
console.log(values)
64-
setIsOpen(false)
65-
}}
6660
childClassName={clsx(
6761
selectedOption && {
6862
"w-full": true,
69-
"h-full": selectedOption.name !== "Catalog Scraper" && selectedOption.category !== "Scraper" && selectedOption.name !== "Custom Topology"
70-
}, !selectedOption && "w-full")}
71-
// bodyClass="flex flex-col flex-1 overflow-y-auto"
63+
"h-full":
64+
selectedOption.name !== "Catalog Scraper" &&
65+
selectedOption.category !== "Scraper" &&
66+
selectedOption.name !== "Custom Topology"
67+
},
68+
!selectedOption && "w-full"
69+
)}
70+
// bodyClass="flex flex-col flex-1 overflow-y-auto"
7271
>
7372
{selectedOption ? (
7473
<AddIntegrationForm
@@ -84,7 +83,7 @@ export default function AddIntegrationModal({ refresh }: Props) {
8483
) : (
8584
<AddIntegrationOptionsList onSelectOption={onSelectOption} />
8685
)}
87-
</Modal >
86+
</Modal>
8887
</>
8988
);
9089
}

src/components/Playbooks/Runs/Submit/SubmitPlaybookRunForm.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ export default function SubmitPlaybookRunForm({
101101
onClose();
102102
setModalSize(undefined);
103103
}}
104-
enforceSizeInHeight
105104
size={modalSize?.width ?? "medium"}
106105
>
107106
<Formik

src/components/SpecEditor/ScraperTypes.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ export default function scraperTypes(
183183
},
184184
{
185185
name: "custom",
186+
type: "code",
186187
label: "Custom",
187188
updateSpec: (value: Record<string, any>) => {
188189
onSubmit(value);
@@ -191,12 +192,10 @@ export default function scraperTypes(
191192
return resourceValue ?? {};
192193
},
193194
icon: FaCog,
194-
configForm: null,
195195
specsMapField: "spec",
196-
rawSpecInput: true,
197196
schemaFileName: "scrape_config.schema.json"
198197
}
199198
];
200-
types.sort((a, b) => a.label.localeCompare(b.label));
199+
types.sort((a, b) => a?.label?.localeCompare(b?.label || "") || 0);
201200
return types;
202201
}

src/components/SpecEditor/SpecEditor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export type SpecTypeCustom = SpecTypeCommonFields & {
4949

5050
export type SpecType = SpecTypeInputForm | SpecTypeCode | SpecTypeCustom;
5151

52-
type SpecEditorProps = {
52+
export type SpecEditorProps = {
5353
types: SpecType[];
5454
format?: "json" | "yaml";
5555
resourceInfo: Pick<SchemaResourceType, "api" | "table" | "name">;

0 commit comments

Comments
 (0)