File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,6 @@ export default function CodeBlock({ children: rawChildren, ...props }) {
9999 } else {
100100 const memberContents = await fetchMembers ( 'Code-Study' ) ;
101101
102- setNames ( memberContents ) ;
103102 const contents = memberContents . map ( async member => {
104103 const contents = await getFilesRecursively ( member , 'LeetCode' , props . metastring ) ;
105104 const codePromises = contents
@@ -108,6 +107,7 @@ export default function CodeBlock({ children: rawChildren, ...props }) {
108107 getRepositoryFileContent ( member , 'LeetCode' , element )
109108 ) ;
110109 const codeContents = await Promise . all ( codePromises ) ;
110+ setNames ( ( prevNames ) => [ ...prevNames , ...member ] ) ;
111111 setCodes ( ( prevCodes ) => [ ...prevCodes , ...codeContents ] ) ;
112112 } ) ;
113113 }
You can’t perform that action at this time.
0 commit comments