(element: ReactElement<unknown>)
| 55 | import { IFrame, type IFrameProps } from "../../components/IFrame"; |
| 56 | |
| 57 | export function encode(element: ReactElement<unknown>) { |
| 58 | const json = encodeChildren([element]); |
| 59 | const stringified = JSON.stringify(json); |
| 60 | |
| 61 | return encodeURIComponent(stringified); |
| 62 | } |
| 63 | |
| 64 | function encodeChildren(children: ReactElement<unknown>[]): EncodedElement[] { |
| 65 | const elements: EncodedElement[] = []; |
no test coverage detected