Skip to content

Commit

Permalink
✨ feat: change options create function
Browse files Browse the repository at this point in the history
  • Loading branch information
ONLY-yours committed Oct 31, 2023
1 parent 23c3705 commit 00876d0
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/Highlight/wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,10 @@ export interface HighlighterWrapperProps extends DivProps {
*/
language: string;
}

const options: SelectProps['options'] = [];

Object.entries(languageMap).forEach(([key, value]) => {
console.log(key, value);
options.push({
label: key,
value: key.toLowerCase(),
});
});
const options: SelectProps['options'] = Object.keys(languageMap).map((key) => ({
label: key,
value: key.toLowerCase(),
}));

export const FullFeatureWrapper = memo<HighlighterWrapperProps & HighlightProps>((props) => {
const {
Expand Down

0 comments on commit 00876d0

Please sign in to comment.