<commit_before>/* eslint-disable */
import React, { Suspense } from "react";
import { render } from "react-dom";

const Lobby = React.lazy(() => import("./lobby/Lobby"));
const Game = React.lazy(() => import("./game/Game"));
let App;

export default function router(_App) {
  App = _App;
  route();
  window.addEventListener("hashchange", route);
}

function route() {
  let path = location.hash.slice(1);
  let [route, id] = path.split("/");
  let component;

  switch(route) {
  case "g":
    component = (
      <Suspense fallback={<div>Loading...</div>}>
        <Game id={ id } />
      </Suspense>
    );
    App.state.players = [];
    App.send("join", id);
    App.state.chat = true;
    App.once("gameInfos", App.updateGameInfos);
    break;
  case "":
    component = (
      <Suspense fallback={<div>Loading...</div>}>
        <Lobby />
      </Suspense>
    );
    break;
  default:<commit_msg>save state of chat (#726)<commit_after>/* eslint-disable */
import React, { Suspense } from "react";
import { render } from "react-dom";

const Lobby = React.lazy(() => import("./lobby/Lobby"));
const Game = React.lazy(() => import("./game/Game"));
let App;

export default function router(_App) {
  App = _App;
  route();
  window.addEventListener("hashchange", route);
}

function route() {
  let path = location.hash.slice(1);
  let [route, id] = path.split("/");
  let component;

  switch(route) {
  case "g":
    component = (
      <Suspense fallback={<div>Loading...</div>}>
        <Game id={ id } />
      </Suspense>
    );
    App.state.players = [];
    App.send("join", id);
    App.once("gameInfos", App.updateGameInfos);
    break;
  case "":
    component = (
      <Suspense fallback={<div>Loading...</div>}>
        <Lobby />
      </Suspense>
    );
    break;
  default:
{'fraction_non_alphanumeric': 0.19532554257095158, 'fraction_numerical': 0.0027824151363383415, 'mean_word_length': 2.8583690987124464, 'pattern_counts': {'":': 4, '<': 23, '<?xml version=': 0, '>': 27, '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': '4079191', 'n_tokens_mistral': 626, 'n_tokens_neox': 615, 'n_words': 135}