diff --git a/libs/remix-ui/tabs/src/lib/remix-ui-tabs.tsx b/libs/remix-ui/tabs/src/lib/remix-ui-tabs.tsx index 5662b0d05b..1c407149b7 100644 --- a/libs/remix-ui/tabs/src/lib/remix-ui-tabs.tsx +++ b/libs/remix-ui/tabs/src/lib/remix-ui-tabs.tsx @@ -27,20 +27,17 @@ interface ITabsState { selectedIndex: number, fileDecorations: fileDecoration[], currentExt: string - fileName: string } interface ITabsAction { type: string, payload: any, ext?: string, - fileName?: string } const initialTabsState: ITabsState = { selectedIndex: -1, fileDecorations: [], - currentExt: '', - fileName: '' + currentExt: '' } const tabsReducer = (state: ITabsState, action: ITabsAction) => { @@ -49,7 +46,6 @@ const tabsReducer = (state: ITabsState, action: ITabsAction) => { return { ...state, currentExt: action.ext, - fileName: action.fileName, selectedIndex: action.payload, } case 'SET_FILE_DECORATIONS': @@ -124,7 +120,7 @@ export const TabsUI = (props: TabsUIProps) => { const activateTab = (name: string) => { const index = tabs.current.findIndex((tab) => tab.name === name) currentIndexRef.current = index - dispatch({ type: 'SELECT_INDEX', payload: index, ext: getExt(name), fileName: name}) + dispatch({ type: 'SELECT_INDEX', payload: index, ext: getExt(name)}) } const setFileDecorations = (fileStates: fileDecoration[]) => { @@ -156,6 +152,7 @@ export const TabsUI = (props: TabsUIProps) => { if (ext) return ext[0].toLowerCase() else return '' } + return (