1
0
Fork 0
mirror of https://github.com/pawelmalak/flame.git synced 2025-08-07 20:05:18 +02:00

Support for keyboard navigation for Apps. Small refactor to pinApp action

This commit is contained in:
unknown 2021-05-22 18:10:12 +02:00
parent 8813bf6181
commit 5c948e1a68
4 changed files with 43 additions and 10 deletions

View file

@ -34,8 +34,9 @@ export interface PinAppAction {
payload: App;
}
export const pinApp = (id: number, isPinned: boolean) => async (dispatch: Dispatch) => {
export const pinApp = (app: App) => async (dispatch: Dispatch) => {
try {
const { id, isPinned} = app;
const res = await axios.put<ApiResponse<App>>(`/api/apps/${id}`, { isPinned: !isPinned });
dispatch<PinAppAction>({