File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { ActionItemLabel } from '@editor/components/Sidebar/Actions/constant'
2- import type { ActionItemLabelType } from '@editor/components/Sidebar/Actions/type'
2+ import type { ActionItemIcon , ActionItemLabelType } from '@editor/components/Sidebar/Actions/type'
33import { useState } from 'react'
44
55export const useActions = ( ) => {
@@ -12,7 +12,7 @@ export const useActions = () => {
1212 [ ActionItemLabel . FILES ] : false ,
1313 } )
1414
15- const actionLabels = {
15+ const actionLabels : Record < ActionItemIcon , ActionItemLabelType > = {
1616 Billing : ActionItemLabel . INVOICE ,
1717 DragDrop : ActionItemLabel . MESSAGE ,
1818 Contract : ActionItemLabel . CONTRACT ,
@@ -22,7 +22,7 @@ export const useActions = () => {
2222 }
2323
2424 const actionItems = Object . entries ( actionLabels ) . map ( ( [ k , v ] ) => ( {
25- icon : k ,
25+ icon : k as ActionItemIcon ,
2626 label : v ,
2727 onChange : ( ) => setChecked ( ( prev ) => ( { ...prev , [ v ] : ! prev [ v ] } ) ) ,
2828 } ) )
You can’t perform that action at this time.
0 commit comments