File tree Expand file tree Collapse file tree
packages/dashboard/src/app/routes/_authenticated/_products Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -308,6 +308,28 @@ function ManageProductVariants() {
308308 />
309309 </ div >
310310 </ div >
311+ < div className = "col-span-1 flex justify-end" >
312+ < Button
313+ size = "icon"
314+ variant = "ghost"
315+ onClick = { ( ) => {
316+ if ( confirm ( t `Are you sure you want to remove this option group? This will affect all variants using this option.` ) ) {
317+ removeOptionGroupMutation . mutate (
318+ { productId : id , optionGroupId : group . id } ,
319+ {
320+ onError : ( error ) => {
321+ toast . error ( t `Failed to remove option group` , {
322+ description : error instanceof Error ? error . message : t `Unknown error` ,
323+ } ) ;
324+ }
325+ }
326+ ) ;
327+ }
328+ } }
329+ >
330+ < Trash2 className = "h-4 w-4 text-destructive" />
331+ </ Button >
332+ </ div >
311333 </ div >
312334 ) )
313335 ) }
You can’t perform that action at this time.
0 commit comments