mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: update eslint rules
This commit is contained in:
1 parent
0e07c64cad
commit
5e8d2b1286
30 files changed
+73
-72
No files matched your search
@@ -4,7 +4,7 @@ if (UiContext.tdoc?._id && UiContext.tdoc.rule !== 'homework') cacheKey += `@${U
|
||||
export default function reducer(state = {
|
||||
lang: localStorage.getItem(`${cacheKey}#lang`) || UiContext.codeLang,
|
||||
code: localStorage.getItem(cacheKey) || UiContext.codeTemplate,
|
||||
}, action) {
|
||||
}, action: any = {}) {
|
||||
if (action.type === 'SCRATCHPAD_EDITOR_UPDATE_CODE') {
|
||||
localStorage.setItem(cacheKey, action.payload);
|
||||
return {
|
||||
|
||||
@@ -4,7 +4,7 @@ export default function reducer(state = {
|
||||
input: '',
|
||||
output: '',
|
||||
rid: null,
|
||||
}, action) {
|
||||
}, action: any = {}) {
|
||||
if (action.type === 'SCRATCHPAD_PRETEST_DATA_CHANGE') {
|
||||
const { type, value } = action.payload;
|
||||
return {
|
||||
|
||||
@@ -3,7 +3,7 @@ import _ from 'lodash';
|
||||
export default function reducer(state = {
|
||||
rows: [],
|
||||
items: {},
|
||||
}, action) {
|
||||
}, action: any = {}) {
|
||||
switch (action.type) {
|
||||
case 'SCRATCHPAD_RECORDS_LOAD_SUBMISSIONS_FULFILLED': {
|
||||
const { rdocs } = action.payload;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export default function reducer(state = {}, action) {
|
||||
export default function reducer(state = {}, action: any = {}) {
|
||||
if (action.type === 'SCRATCHPAD_STATE_UPDATE') {
|
||||
const { key, value } = action.payload;
|
||||
return {
|
||||
|
||||
@@ -21,7 +21,7 @@ export default function reducer(state = {
|
||||
waitSec: 0,
|
||||
isWaiting: false,
|
||||
activePage: 'problem',
|
||||
}, action) {
|
||||
}, action: any = {}) {
|
||||
switch (action.type) {
|
||||
case 'SCRATCHPAD_UI_CHANGE_SIZE': {
|
||||
const { uiElement, size } = action.payload;
|
||||
|
||||
Reference in new issue
Block a user