-
-
Save OliverJAsh/8840dcc5ad889b8a9efb565ddaa4338c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// (action, state) => ({ actions, state }); | |
const reducer = State.match({ | |
FetchingDimensions: () => | |
Action.match({ | |
FetchedDimensions: ({ dimensions }) => | |
checkDimensionsValid(dimensions) | |
? { | |
state: State.Uploading(), | |
actions: [Action.Upload()] | |
} | |
: { | |
state: State.Invalid(), | |
actions: [] | |
} | |
}) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment