Skip to content

Commit

Permalink
[Fix] align name with code
Browse files Browse the repository at this point in the history
  • Loading branch information
junnei committed Nov 15, 2024
1 parent ce0c903 commit 299a417
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/theme/CodeBlock/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ export default function CodeBlock({ children: rawChildren, ...props }) {
} else {
const memberContents = await fetchMembers('Code-Study');

setNames(memberContents);
const contents = memberContents.map(async member => {
const contents = await getFilesRecursively(member, 'LeetCode', props.metastring);
const codePromises = contents
Expand All @@ -108,6 +107,7 @@ export default function CodeBlock({ children: rawChildren, ...props }) {
getRepositoryFileContent(member, 'LeetCode', element)
);
const codeContents = await Promise.all(codePromises);
setNames((prevNames) => [...prevNames, ...member]);
setCodes((prevCodes) => [...prevCodes, ...codeContents]);
});
}
Expand Down

0 comments on commit 299a417

Please sign in to comment.