chore(learn): Merge learn in to the client app
This commit is contained in:
12
client/src/redux/update-complete-epic.js
Normal file
12
client/src/redux/update-complete-epic.js
Normal file
@@ -0,0 +1,12 @@
|
||||
import { ofType } from 'redux-observable';
|
||||
import { mapTo, filter } from 'rxjs/operators';
|
||||
|
||||
import { types, onlineStatusChange, isOnlineSelector } from './';
|
||||
|
||||
export default function updateCompleteEpic(action$, state$) {
|
||||
return action$.pipe(
|
||||
ofType(types.updateComplete),
|
||||
filter(() => !isOnlineSelector(state$.value)),
|
||||
mapTo(onlineStatusChange(true))
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user