Skip to content

Commit d5149df

Browse files
committed
fix(OUT-2838): fix typing
1 parent ad7cc9e commit d5149df

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/features/editor/components/Sidebar/Actions/useActions.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { 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'
33
import { useState } from 'react'
44

55
export 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
}))

0 commit comments

Comments
 (0)