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 }) {
99
99
} else {
100
100
const memberContents = await fetchMembers ( 'Code-Study' ) ;
101
101
102
- setNames ( memberContents ) ;
103
102
const contents = memberContents . map ( async member => {
104
103
const contents = await getFilesRecursively ( member , 'LeetCode' , props . metastring ) ;
105
104
const codePromises = contents
@@ -108,6 +107,7 @@ export default function CodeBlock({ children: rawChildren, ...props }) {
108
107
getRepositoryFileContent ( member , 'LeetCode' , element )
109
108
) ;
110
109
const codeContents = await Promise . all ( codePromises ) ;
110
+ setNames ( ( prevNames ) => [ ...prevNames , ...member ] ) ;
111
111
setCodes ( ( prevCodes ) => [ ...prevCodes , ...codeContents ] ) ;
112
112
} ) ;
113
113
}
You can’t perform that action at this time.
0 commit comments