refactor(use-problem): pass problemId to getPath function

This commit is contained in:
cfngc4594 2025-03-23 15:36:53 +08:00
parent b339e407cf
commit 0e5e683ef3

View File

@ -69,8 +69,8 @@ export const useProblem = () => {
);
const currentPath = useMemo(
() => (currentEditorLanguageConfig ? getPath(currentEditorLanguageConfig) : ""),
[currentEditorLanguageConfig]
() => (currentEditorLanguageConfig ? getPath(problemId, currentEditorLanguageConfig) : ""),
[problemId, currentEditorLanguageConfig]
);
// On initialization, load the stored language and corresponding code content