Skip to content

Commit

Permalink
Merge pull request #1791 from stakwork/feature/add-ref-id
Browse files Browse the repository at this point in the history
feat: fix for blueprint
  • Loading branch information
Rassl authored Jul 9, 2024
2 parents 4ead6e4 + bbfc63b commit 8da92e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/network/fetchSourcesData/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ export interface Schema {
search_term?: string
is_deleted?: boolean
children?: string[]
attributes?: { [key: string]: string }
}

export interface SchemaLink {
Expand Down
2 changes: 1 addition & 1 deletion src/stores/useSchemaStore/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const defaultData: Omit<SchemasStore, 'setSchemas' | 'setSchemaLinks'> = {
export const useSchemaStore = create<SchemasStore>((set) => ({
...defaultData,
setSchemas: (schemas: SchemaExtended[]) => {
set({ schemas })
set({ schemas: schemas.map((i) => ({ ...i, ref_id: i?.attributes?.ref_id || '' })) })
},
setSchemaLinks: (links: SchemaLink[]) => {
set({ links })
Expand Down

0 comments on commit 8da92e2

Please sign in to comment.