| 119 | } |
| 120 | |
| 121 | const handleResponseResize = () => { |
| 122 | if (requestCodeExample.current) { |
| 123 | const requestCodeHeight = requestCodeExample.current.clientHeight || 0 |
| 124 | const { innerHeight: height } = window |
| 125 | if (responseCodeExample) { |
| 126 | // 520 pixels roughly accounts for the space taken up by the |
| 127 | // nav bar, headers, language picker, method section, and response |
| 128 | // picker |
| 129 | setResponseMaxHeight(height - requestCodeHeight - 520) |
| 130 | } |
| 131 | } |
| 132 | } |
| 133 | |
| 134 | // Change the language based on cookies |
| 135 | useEffect(() => { |