<commit_before>/*
 *
 * AddHintContainer actions
 *
 */

import {
  DEFAULT_ACTION,
  GET_COORDINATES,
  GET_COORDINATES_ERROR,
  GET_COORDINATES_SUCCESS,
  SUBMIT_COORDINATES_SUCCESS,
  SUBMIT_COORDINATES,
  SUBMIT_COORDINATES_ERROR,
} from './constants';

export function defaultAction() {
  return {
    type: DEFAULT_ACTION,
  };
}

export function getCoordinates(rdx, rdy) {
  return {
    type: GET_COORDINATES,
    rdx,
    rdy,
  };
}

export function getCoordinatesLoaded(response) {
  return {
    type: GET_COORDINATES_SUCCESS,
    response,
  };
}

export function getCoordinatesError() {
  return {
    type: GET_COORDINATES_ERROR,
  };
}

export function submitCoordinates() {
  return {
    type: SUBMIT_COORDINATES,
  };
}

export function submitCoordinateSuccess() {
  return {
    type: SUBMIT_COORDINATES_SUCCESS,<commit_msg>Fixed addHint<commit_after>/*
 *
 * AddHintContainer actions
 *
 */

import {
  DEFAULT_ACTION,
  GET_COORDINATES,
  GET_COORDINATES_ERROR,
  GET_COORDINATES_SUCCESS,
  SUBMIT_COORDINATES_SUCCESS,
  SUBMIT_COORDINATES,
  SUBMIT_COORDINATES_ERROR,
} from './constants';

export function defaultAction() {
  return {
    type: DEFAULT_ACTION,
  };
}

export function getCoordinates(rdx, rdy) {
  return {
    type: GET_COORDINATES,
    rdx,
    rdy,
  };
}

export function getCoordinatesLoaded(response) {
  return {
    type: GET_COORDINATES_SUCCESS,
    response,
  };
}

export function getCoordinatesError() {
  return {
    type: GET_COORDINATES_ERROR,
  };
}

export function submitCoordinates() {
  return {
    type: SUBMIT_COORDINATES,
  };
}

export function submitCoordinateSuccess() {
  window.location = '/hint/add';
  return {
    type: SUBMIT_COORDINATES_SUCCESS,
{'fraction_non_alphanumeric': 0.09587449157466589, 'fraction_numerical': 0.0, 'mean_word_length': 4.005813953488372, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7047352', 'n_tokens_mistral': 636, 'n_tokens_neox': 625, 'n_words': 108}