mirror of
https://github.com/pawelmalak/flame.git
synced 2025-08-07 11:55:17 +02:00
Apps reordering with drag-and-drop functionality
This commit is contained in:
parent
754dc3a7b9
commit
5b900872af
4 changed files with 134 additions and 90 deletions
|
@ -161,15 +161,7 @@ export const reorderApps = (apps: App[]) => async (dispatch: Dispatch) => {
|
|||
orderId: index + 1
|
||||
}))
|
||||
|
||||
await axios.put<{}>('/api/apps/0/reorder', updateQuery);
|
||||
|
||||
dispatch<CreateNotificationAction>({
|
||||
type: ActionTypes.createNotification,
|
||||
payload: {
|
||||
title: 'Success',
|
||||
message: 'New order saved'
|
||||
}
|
||||
})
|
||||
await axios.put<ApiResponse<{}>>('/api/apps/0/reorder', updateQuery);
|
||||
|
||||
dispatch<ReorderAppsAction>({
|
||||
type: ActionTypes.reorderApps,
|
||||
|
@ -189,8 +181,6 @@ export const sortApps = () => async (dispatch: Dispatch) => {
|
|||
try {
|
||||
const res = await axios.get<ApiResponse<Config>>('/api/config/useOrdering');
|
||||
|
||||
console.log(res.data.data);
|
||||
|
||||
dispatch<SortAppsAction>({
|
||||
type: ActionTypes.sortApps,
|
||||
payload: res.data.data.value
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue