({
target,
reloadDocument,
externalHost,
}: RedirectOnClickProps)
| 8 | } |
| 9 | |
| 10 | export function RedirectOnClick({ |
| 11 | target, |
| 12 | reloadDocument, |
| 13 | externalHost, |
| 14 | }: RedirectOnClickProps) { |
| 15 | const execute = useServerFn(throwRedirect) |
| 16 | return ( |
| 17 | <button |
| 18 | data-testid="redirect-on-click" |
| 19 | onClick={() => |
| 20 | execute({ data: { target, reloadDocument, externalHost } }) |
| 21 | } |
| 22 | > |
| 23 | click me |
| 24 | </button> |
| 25 | ) |
| 26 | } |
nothing calls this directly
no test coverage detected