mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-18 07:16:34 +00:00
refactor(use-problem): pass problemId to getPath function
This commit is contained in:
parent
b339e407cf
commit
0e5e683ef3
@ -69,8 +69,8 @@ export const useProblem = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const currentPath = useMemo(
|
const currentPath = useMemo(
|
||||||
() => (currentEditorLanguageConfig ? getPath(currentEditorLanguageConfig) : ""),
|
() => (currentEditorLanguageConfig ? getPath(problemId, currentEditorLanguageConfig) : ""),
|
||||||
[currentEditorLanguageConfig]
|
[problemId, currentEditorLanguageConfig]
|
||||||
);
|
);
|
||||||
|
|
||||||
// On initialization, load the stored language and corresponding code content
|
// On initialization, load the stored language and corresponding code content
|
||||||
|
Loading…
Reference in New Issue
Block a user