Skip to content

Commit 6fc6633

Browse files
authored
Merge pull request #4246 from cpinitiative/update_modal
put new solutions in the proper folder
2 parents afb1c8a + 369e3dd commit 6fc6633

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/atoms/editor.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,12 @@ export const openOrCreateExistingFileAtom = atom(
119119
export const createNewInternalSolutionFileAtom = atom(
120120
null,
121121
async (get, set, file: AlgoliaEditorSolutionFile) => {
122+
console.log(file);
123+
const module = file.problemModules[0]?.path.split('/')[1];
124+
console.log(module);
125+
const division = !module ? 'orphaned' : module.split('_')[1].toLowerCase();
122126
const newFile: EditorFile = {
123-
path: `solutions/${file.id}.mdx`,
127+
path: `solutions/${division}/${file.id}.mdx`,
124128
markdown: `---
125129
id: ${file.id}
126130
source: ${

0 commit comments

Comments
 (0)