Fix album detail table customizations

This commit is contained in:
jeffvli 2023-10-07 18:11:02 -07:00
parent 49b6478b72
commit 277669c413
3 changed files with 51 additions and 8 deletions

View file

@ -196,6 +196,7 @@ export interface SettingsSlice extends SettingsState {
reset: () => void;
setSettings: (data: Partial<SettingsState>) => void;
setSidebarItems: (items: SidebarItemType[]) => void;
setTable: (type: TableType, data: DataTableProps) => void;
};
}
@ -493,6 +494,11 @@ export const useSettingsStore = create<SettingsSlice>()(
state.general.sidebarItems = items;
});
},
setTable: (type: TableType, data: DataTableProps) => {
set((state) => {
state.tables[type] = data;
});
},
},
...initialState,
})),