pl-fe: migrate drafts to mutative
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
5c58196201
commit
9f51735099
1 changed files with 6 additions and 4 deletions
|
@ -24,10 +24,12 @@ const fetchDraftStatuses = () =>
|
||||||
const accountUrl = getAccount(state, state.me as string)!.url;
|
const accountUrl = getAccount(state, state.me as string)!.url;
|
||||||
|
|
||||||
return KVStore.getItem<Array<APIEntity>>(`drafts:${accountUrl}`).then((statuses) => {
|
return KVStore.getItem<Array<APIEntity>>(`drafts:${accountUrl}`).then((statuses) => {
|
||||||
dispatch<DraftStatusesFetchSuccessAction>({
|
if (statuses) {
|
||||||
type: DRAFT_STATUSES_FETCH_SUCCESS,
|
dispatch<DraftStatusesFetchSuccessAction>({
|
||||||
statuses,
|
type: DRAFT_STATUSES_FETCH_SUCCESS,
|
||||||
});
|
statuses,
|
||||||
|
});
|
||||||
|
}
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue