( url: string, toast: ToastInput, init?: ResponseInit, )
| 27 | }) |
| 28 | |
| 29 | export 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 | |
| 40 | export async function createToastHeaders(toastInput: ToastInput) { |
| 41 | const session = await toastSessionStorage.getSession() |
no test coverage detected