Skip to content
Snippets Groups Projects
Select Git revision
  • 4859c48774d1e40d694a2564a2746e45bc402839
  • master default protected
  • schwifi
  • eckbalu-master-patch-41181
  • halof
  • our-team
  • 0.12.9 protected
  • 0.12.8 protected
  • 0.12.7 protected
  • 0.12.6 protected
  • 0.12.5 protected
  • 0.12.4 protected
  • 0.12.3 protected
  • 0.12.2 protected
  • 0.12.1 protected
  • 0.12.0 protected
  • 0.11.5 protected
  • 0.11.4 protected
  • 0.11.3 protected
  • 0.11.2 protected
  • 0.11.1 protected
  • 0.11.0 protected
  • 0.10.6 protected
  • 0.10.5 protected
  • 0.10.4 protected
  • 0.10.3 protected
26 results

Dockerfile

Blame
  • CorrectSolutionReducer.js 699 B
    import { WRITE_SOLUTION, CHECK, CLEAR_WRITE, SELECT_SOLUTION } from '../actions/types';
    
    const INITIAL_STATE = {
      accepted: false,
      corrected: false,
      note: '',
    };
    
    export default (state = INITIAL_STATE, action) => {
      switch (action.type) {
        case SELECT_SOLUTION:
          return {
            corrected: action.payload.corrected,
            accepted: action.payload.accepted,
            note: action.payload.note,
          };
        case WRITE_SOLUTION:
          return { ...state, [action.target]: action.payload };
        case CHECK:
          return {
            ...state,
            [action.target]: !state[action.target],
          };
        case CLEAR_WRITE:
          return INITIAL_STATE;
        default:
          return state;
      }
    };