(element: ReactElement<unknown>)
| 39 | import { IFrame, type IFrameProps } from "../../components/IFrame"; |
| 40 | |
| 41 | export function encode(element: ReactElement<unknown>) { |
| 42 | const json = encodeChildren([element]); |
| 43 | const stringified = JSON.stringify(json); |
| 44 | |
| 45 | return encodeURIComponent(stringified); |
| 46 | } |
| 47 | |
| 48 | function encodeChildren(children: ReactElement<unknown>[]): EncodedElement[] { |
| 49 | const elements: EncodedElement[] = []; |
no test coverage detected