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> <Text>
{AsyncData.match(state, { {AsyncData.match(state, {
NoData: () => "No data yet", NoData: () => "No data yet",
Loading: () => "Loading...", Loading: progress =>
Success: value => `Loading...
`Value: ${value}`, ${ Option.match(progress, {
Failure: cause => onSome: ({ loaded, total }) => ` (${ loaded }/${ Option.getOrElse(total, () => "unknown") })`,
`Error: ${cause}`, onNone: () => "",
}) }`,
Success: value => `Value: ${ value }`,
Failure: cause => `Error: ${ cause }`,
})} })}
</Text> </Text>