File tree 4 files changed +11
-4
lines changed
components/v2Editor/customBlocks
4 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -316,7 +316,8 @@ function PythonBlock(props: Props) {
316
316
title,
317
317
type : 'python' ,
318
318
} ,
319
- props . document . title
319
+ props . document . title ,
320
+ props . document . icon
320
321
)
321
322
} else if ( ! isComponentInstance ) {
322
323
// can only update component if it is not an instance
Original file line number Diff line number Diff line change @@ -445,7 +445,8 @@ function SQLBlock(props: Props) {
445
445
title,
446
446
type : 'sql' ,
447
447
} ,
448
- props . document . title
448
+ props . document . title ,
449
+ props . document . icon
449
450
)
450
451
} else if ( ! isComponentInstance ) {
451
452
// can only update component if it is not an instance
Original file line number Diff line number Diff line change @@ -21,7 +21,8 @@ type API = {
21
21
create : (
22
22
workspaceId : string ,
23
23
data : Omit < NewReusableComponent , 'id' > & { id : string } ,
24
- documenTitle : string
24
+ documenTitle : string ,
25
+ documentIcon : string
25
26
) => void
26
27
update : (
27
28
workspaceId : string ,
@@ -161,7 +162,8 @@ export function ReusableComponentsProvider(props: Props) {
161
162
async (
162
163
workspaceId : string ,
163
164
data : Omit < NewReusableComponent , 'id' > & { id : string } ,
164
- documentTitle : string
165
+ documentTitle : string ,
166
+ documentIcon : string
165
167
) => {
166
168
// optimistic update
167
169
setState ( ( state ) => {
@@ -176,6 +178,7 @@ export function ReusableComponentsProvider(props: Props) {
176
178
document : {
177
179
id : data . documentId ,
178
180
title : documentTitle ,
181
+ icon : documentIcon ,
179
182
} ,
180
183
createdAt : new Date ( ) . toISOString ( ) ,
181
184
updatedAt : new Date ( ) . toISOString ( ) ,
Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ export async function createReusableComponent(
71
71
select : {
72
72
id : true ,
73
73
title : true ,
74
+ icon : true ,
74
75
} ,
75
76
} ,
76
77
} ,
@@ -105,6 +106,7 @@ export async function updateReusableComponent(
105
106
select : {
106
107
id : true ,
107
108
title : true ,
109
+ icon : true ,
108
110
} ,
109
111
} ,
110
112
} ,
You can’t perform that action at this time.
0 commit comments