MCPcopy
hub / github.com/epicweb-dev/epic-stack / redirectWithToast

Function redirectWithToast

app/utils/toast.server.ts:29–38  ·  view source on GitHub ↗
(
	url: string,
	toast: ToastInput,
	init?: ResponseInit,
)

Source from the content-addressed store, hash-verified

27})
28
29export async function redirectWithToast(
30 url: string,
31 toast: ToastInput,
32 init?: ResponseInit,
33) {
34 return redirect(url, {
35 ...init,
36 headers: combineHeaders(init?.headers, await createToastHeaders(toast)),
37 })
38}
39
40export async function createToastHeaders(toastInput: ToastInput) {
41 const session = await toastSessionStorage.getSession()

Callers 11

actionFunction · 0.90
actionFunction · 0.90
deleteDataActionFunction · 0.90
actionFunction · 0.90
actionFunction · 0.90
handleVerificationFunction · 0.90
actionFunction · 0.90
actionFunction · 0.90
loaderFunction · 0.90
handleVerificationFunction · 0.90

Calls 2

combineHeadersFunction · 0.90
createToastHeadersFunction · 0.85

Tested by

no test coverage detected