()
| 165 | <PiPContext.Provider value={value}>{props.children}</PiPContext.Provider> |
| 166 | ) |
| 167 | } |
| 168 | |
| 169 | export const createPiPWindow = () => { |
| 170 | const context = createMemo(() => { |
| 171 | const ctx = getContext(PiPContext) |
| 172 | if (!ctx) { |
| 173 | throw new Error('createPiPWindow must be used within a PiPProvider') |
| 174 | } |
| 175 | return ctx() |
| 176 | }) |
| 177 | return context |
| 178 | } |
no test coverage detected