MCPcopy Index your code
hub / github.com/github/docs / handleResponseResize

Function handleResponseResize

components/rest/RestCodeSamples.tsx:121–132  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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(() => {

Callers 1

RestCodeSamplesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected