Mutation progress
All checks were successful
Lint / lint (push) Successful in 14s

This commit is contained in:
Julien Valverdé
2025-03-21 03:38:48 +01:00
parent 2d94e84941
commit 1ec1db0658

View File

@@ -57,11 +57,14 @@ function RouteComponent() {
<Text>
{AsyncData.match(state, {
NoData: () => "No data yet",
Loading: () => "Loading...",
Success: value =>
`Value: ${value}`,
Failure: cause =>
`Error: ${cause}`,
Loading: progress =>
`Loading...
${ Option.match(progress, {
onSome: ({ loaded, total }) => ` (${ loaded }/${ Option.getOrElse(total, () => "unknown") })`,
onNone: () => "",
}) }`,
Success: value => `Value: ${ value }`,
Failure: cause => `Error: ${ cause }`,
})}
</Text>