1
0
Fork 0
mirror of https://github.com/pawelmalak/flame.git synced 2025-07-30 08:09:35 +02:00

Functionality to delete and edit custom themes

This commit is contained in:
Paweł Malak 2022-03-25 12:13:19 +01:00
parent ad92de141b
commit 668edb03d3
10 changed files with 157 additions and 12 deletions

View file

@ -19,9 +19,15 @@ export const ThemeEditor = (props: Props): JSX.Element => {
theme: { userThemes },
} = useSelector((state: State) => state);
const { deleteTheme } = bindActionCreators(actionCreators, useDispatch());
const { deleteTheme, editTheme } = bindActionCreators(
actionCreators,
useDispatch()
);
const updateHandler = (theme: Theme) => {};
const updateHandler = (theme: Theme) => {
props.modalHandler();
editTheme(theme);
};
const deleteHandler = (theme: Theme) => {
if (window.confirm(`Are you sure you want to delete this theme?`)) {