mirror of
https://github.com/pawelmalak/flame.git
synced 2026-03-10 06:23:11 +08:00
Support for keyboard navigation for Apps. Small refactor to pinApp action
This commit is contained in:
@@ -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>({
|
||||
|
||||
Reference in New Issue
Block a user