<commit_before>export default function getBaseUrl() {
  const inDevelopment = window.location.hostname === 'localhost';
  return inDevelopment ? 'http://localhost:3001/' : '/'
}<commit_msg>Check for mock api in path<commit_after>export default function getBaseUrl() {
  return getQueryStringParameterByName('useMockApi') ? 'http://localhost:3001/' : '/';
}

function getQueryStringParameterByName(name, url) {
  url = url || window.location.href;
  console.log(url.indexOf(name) > -1, url);
  return url.indexOf(name) > -1;
}
{'fraction_non_alphanumeric': 0.15047619047619049, 'fraction_numerical': 0.01904761904761905, 'mean_word_length': 5.414634146341464, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2803794', 'n_tokens_mistral': 168, 'n_tokens_neox': 159, 'n_words': 35}