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

Function handleLanguageSelection

components/rest/RestCodeSamples.tsx:113–119  ·  view source on GitHub ↗
(languageKey: keyof ExampleT)

Source from the content-addressed store, hash-verified

111 }
112
113 const handleLanguageSelection = (languageKey: keyof ExampleT) => {
114 setSelectedLanguage(languageKey)
115 Cookies.set('codeSampleLanguagePreferred', languageKey, {
116 sameSite: 'strict',
117 secure: document.location.protocol !== 'http:',
118 })
119 }
120
121 const handleResponseResize = () => {
122 if (requestCodeExample.current) {

Callers 1

RestCodeSamplesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected