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:
parent
8813bf6181
commit
5c948e1a68
4 changed files with 43 additions and 10 deletions
|
@ -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>({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue