feat: display shell code exporter at the top

This commit is contained in:
Anoop M D 2024-09-16 00:12:36 +05:30
parent 7dd639192c
commit 3dfb27d447
2 changed files with 9 additions and 1 deletions

View File

@ -8,7 +8,7 @@ const StyledWrapper = styled.div`
.generate-code-sidebar { .generate-code-sidebar {
background-color: ${(props) => props.theme.collection.environment.settings.sidebar.bg}; background-color: ${(props) => props.theme.collection.environment.settings.sidebar.bg};
border-right: solid 1px ${(props) => props.theme.collection.environment.settings.sidebar.borderRight}; border-right: solid 1px ${(props) => props.theme.collection.environment.settings.sidebar.borderRight};
max-height: 90vh; max-height: 80vh;
height: 100%; height: 100%;
overflow-y: auto; overflow-y: auto;
} }

View File

@ -18,6 +18,14 @@ export const getLanguages = () => {
client client
})); }));
allLanguages.push(...languages); allLanguages.push(...languages);
// Move "Shell-curl" to the top of the array
const shellCurlIndex = allLanguages.findIndex(lang => lang.name === "Shell-curl");
if (shellCurlIndex !== -1) {
const [shellCurl] = allLanguages.splice(shellCurlIndex, 1);
allLanguages.unshift(shellCurl);
}
} }
return allLanguages; return allLanguages;
}; };