mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
ui: remove babel
This commit is contained in:
1 parent
ff943b620e
commit
c7c70a6abb
23 files changed
+466
-606
No files matched your search
@@ -3,20 +3,20 @@ export default function reducer(state = {
|
||||
code: localStorage.getItem(`${UserContext._id}/${UiContext.pdoc.domainId}/${UiContext.pdoc.docId}`) || UiContext.codeTemplate,
|
||||
}, action) {
|
||||
switch (action.type) {
|
||||
case 'SCRATCHPAD_EDITOR_UPDATE_CODE': {
|
||||
localStorage.setItem(`${UserContext._id}/${UiContext.pdoc.domainId}/${UiContext.pdoc.docId}`, action.payload);
|
||||
return {
|
||||
...state,
|
||||
code: action.payload,
|
||||
};
|
||||
}
|
||||
case 'SCRATCHPAD_EDITOR_SET_LANG': {
|
||||
return {
|
||||
...state,
|
||||
lang: action.payload,
|
||||
};
|
||||
}
|
||||
default:
|
||||
return state;
|
||||
case 'SCRATCHPAD_EDITOR_UPDATE_CODE': {
|
||||
localStorage.setItem(`${UserContext._id}/${UiContext.pdoc.domainId}/${UiContext.pdoc.docId}`, action.payload);
|
||||
return {
|
||||
...state,
|
||||
code: action.payload,
|
||||
};
|
||||
}
|
||||
case 'SCRATCHPAD_EDITOR_SET_LANG': {
|
||||
return {
|
||||
...state,
|
||||
lang: action.payload,
|
||||
};
|
||||
}
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user