This repository has been archived by the owner on Nov 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(catalog): Mini catalog is taking a long time to load
Fixes: #1269
- Loading branch information
1 parent
4b801cc
commit a42d28e
Showing
5 changed files
with
117 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// @ts-ignore | ||
import initDsl from './settingsStore'; | ||
import { IStepProps } from '@kaoto/types'; | ||
import { create } from 'zustand'; | ||
|
||
interface IStepCatalogStore { | ||
dsl: string; | ||
stepCatalog: IStepProps[]; | ||
setDsl: (dsl: string) => void; | ||
setStepCatalog: (vals: IStepProps[]) => void; | ||
} | ||
|
||
export const initialStepCatalog: IStepProps[] = []; | ||
export const useStepCatalogStore = create<IStepCatalogStore>((set) => ({ | ||
dsl: initDsl.name, | ||
stepCatalog: initialStepCatalog, | ||
setDsl: (dsl: string) => { | ||
set({ dsl: dsl, stepCatalog: [] }); | ||
}, | ||
setStepCatalog: (vals: IStepProps[]) => { | ||
set({ stepCatalog: vals }); | ||
}, | ||
})); | ||
|
||
export default useStepCatalogStore; |