Skip to content

Commit d9518f9

Browse files
authored
Merge pull request #667 from HarshGID100/patch-2
chore: clean stale code
2 parents f73d5b6 + ba7c4ce commit d9518f9

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/context/browserSteps.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ export interface TextStep {
66
label: string;
77
data: string;
88
selectorObj: SelectorObject;
9-
actionId?: string; // Add actionId to track which action created this step
9+
actionId?: string;
1010
}
1111

1212
interface ScreenshotStep {
1313
id: number;
1414
type: 'screenshot';
1515
fullPage: boolean;
16-
actionId?: string; // Add actionId to track which action created this step
16+
actionId?: string;
1717
}
1818

1919
export interface ListStep {
@@ -26,7 +26,7 @@ export interface ListStep {
2626
selector: string;
2727
};
2828
limit?: number;
29-
actionId?: string; // Add actionId to track which action created this step
29+
actionId?: string;
3030
}
3131

3232
export type BrowserStep = TextStep | ScreenshotStep | ListStep;
@@ -50,8 +50,7 @@ interface BrowserStepsContextType {
5050
updateListStepLimit: (listId: number, limit: number) => void;
5151
updateListStepData: (listId: number, extractedData: any[]) => void;
5252
removeListTextField: (listId: number, fieldKey: string) => void;
53-
deleteStepsByActionId: (actionId: string) => void; // New function to delete steps by actionId
54-
}
53+
deleteStepsByActionId: (actionId: string) => void;
5554

5655
const BrowserStepsContext = createContext<BrowserStepsContextType | undefined>(undefined);
5756

@@ -220,7 +219,7 @@ export const BrowserStepsProvider: React.FC<{ children: React.ReactNode }> = ({
220219
updateListStepLimit,
221220
updateListStepData,
222221
removeListTextField,
223-
deleteStepsByActionId, // Export the new function
222+
deleteStepsByActionId,
224223
}}>
225224
{children}
226225
</BrowserStepsContext.Provider>
@@ -233,4 +232,4 @@ export const useBrowserSteps = () => {
233232
throw new Error('useBrowserSteps must be used within a BrowserStepsProvider');
234233
}
235234
return context;
236-
};
235+
};

0 commit comments

Comments
 (0)