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:
parent
ad92de141b
commit
668edb03d3
10 changed files with 157 additions and 12 deletions
|
@ -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?`)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue