-
-
Automatic updates
-
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et nibh sit amet mauris faucibus molestie
- gravida at orci.
-
+ <>
+
+
+ >
);
};
diff --git a/src/services/apps/hooks/use-apps.ts b/src/services/apps/hooks/use-apps.ts
index 919bebe..521df87 100644
--- a/src/services/apps/hooks/use-apps.ts
+++ b/src/services/apps/hooks/use-apps.ts
@@ -1,5 +1,5 @@
import { useDispatch, useSelector } from 'react-redux';
-import { fetchApps, fetchAppBySlug, updateAppBySlug, installAppBySlug, clearCurrentApp, deleteApp } from '../redux';
+import { fetchApps, fetchAppBySlug, updateApp, installAppBySlug, clearCurrentApp, deleteApp } from '../redux';
import { getCurrentApp, getAppLoading, getAppsLoading, getApps } from '../redux/selectors';
export function useApps() {
@@ -17,8 +17,8 @@ export function useApps() {
return dispatch(fetchAppBySlug(slug));
}
- function editAppBySlug(data: any) {
- return dispatch(updateAppBySlug(data));
+ function editApp(data: any) {
+ return dispatch(updateApp(data));
}
function installApp(data: any) {
@@ -38,7 +38,7 @@ export function useApps() {
app,
loadApp,
loadApps,
- editAppBySlug,
+ editApp,
appLoading,
appTableLoading,
installApp,
diff --git a/src/services/apps/redux/actions.ts b/src/services/apps/redux/actions.ts
index 8bd4d48..17b8f2c 100644
--- a/src/services/apps/redux/actions.ts
+++ b/src/services/apps/redux/actions.ts
@@ -68,7 +68,7 @@ export const fetchAppBySlug = (slug: string) => async (dispatch: Dispatch
)
dispatch(setAppLoading(false));
};
-export const updateAppBySlug = (app: any) => async (dispatch: Dispatch) => {
+export const updateApp = (app: any) => async (dispatch: Dispatch) => {
dispatch(setAppLoading(true));
try {
@@ -83,6 +83,8 @@ export const updateAppBySlug = (app: any) => async (dispatch: Dispatch) =>
payload: transformApp(data),
});
+ showToast('App is updated!', ToastType.Success);
+
dispatch(fetchApps());
} catch (err) {
console.error(err);