Skip to content

Commit 753a9ea

Browse files
feat(task): show notification after adding and updating task
1 parent e83650a commit 753a9ea

File tree

3 files changed

+2
-1
lines changed

3 files changed

+2
-1
lines changed

src/renderer/context/AppProvider.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ const AppContextFn = (initialUser: User | null) => {
130130

131131
const clearNotifier = useCallback(() => {
132132
setShowSnackbar(false);
133-
setNotification(undefined);
134133
}, []);
135134

136135
const handlePageRefresh = useCallback(() => {

src/renderer/widgets/AddTask.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ const AddTask = forwardRef<HTMLDivElement, IAddTaskProps>((props, ref) => {
162162
);
163163

164164
widgetCloseFunc(false);
165+
setNotifier(`'${taskTitle}' created successfully`, 'success');
165166
} catch (err: any) {
166167
setNotifier(err.message, 'error');
167168
}

src/renderer/widgets/EditTask.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ function EditTask({
210210
}
211211

212212
widgetCloseFunc();
213+
setNotifier(`'${taskTitle}' updated successfully`, 'success');
213214
} catch (err: any) {
214215
setNotifier(err.message, 'error');
215216
}

0 commit comments

Comments
 (0)