refusals.ts
This file
Path
apps/web/src/features/shared/refusals.ts
10 lines · 358 bytes · TypeScript
Last changed by
Merge build/comments-web-features into mainoscabrielbefore adoption74bfc72
History of this fileTake it
Fold every page's project events once, keep Markdown off the first load, and cache what never changesoscabrielbefore adoption38e5215
lines 1–10why, one step back1import { Refusal } from "@repo/protocol/refusal";2import { notFound } from "@tanstack/react-router";3import { Effect, Schema } from "effect";45export const Refusals = Schema.NonEmptyArray(Refusal);67export const notFoundFor = (refusal: Refusal) =>8 Effect.flatMap(Schema.encodeEffect(Refusals)([refusal]), (data) =>9 Effect.fail(notFound({ data }))10 );