useSubscribeStream work
All checks were successful
Lint / lint (push) Successful in 13s

This commit is contained in:
Julien Valverdé
2025-05-05 02:39:12 +02:00
parent d6256a7cfd
commit 5b3637afd8
2 changed files with 40 additions and 17 deletions

View File

@@ -18,6 +18,20 @@ export function VQueryErrorHandler() {
), [])
)
const error2 = R.useSubscribeStream(
R.useMemo(() => AppQueryErrorHandler.pipe(
Effect.flatMap()
Effect.map(handler => handler.errors.pipe(
Stream.changes,
Stream.tap(Console.error),
Stream.tap(() => Effect.sync(() => setOpen(true))),
))
), []),
() => Effect.fail(new Error()),
)
if (Option.isNone(error))
return <></>