<commit_before>import React, { useEffect } from "react";
import { useDispatch } from "react-redux";
import { load, unload } from "../redux";

export default function PageLoadingPlaceholder() {
  const dispatch = useDispatch();

  // Considérer qu'il y a un chargement en cours lorsque ce composant est affiché
  useEffect(() => {
    dispatch(load());
    return () => dispatch(unload());
  }, [dispatch]);

  return <p className="lead">Chargement de la page en cours&hellip;</p>;
}<commit_msg>Better page loading indicator<commit_after>import React, { useEffect } from "react";
import { useDispatch } from "react-redux";
import { load, unload } from "../redux";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faCircleNotch } from "@fortawesome/free-solid-svg-icons";

export default function PageLoadingPlaceholder() {
  const dispatch = useDispatch();

  // Considérer qu'il y a un chargement en cours lorsque ce composant est affiché
  useEffect(() => {
    dispatch(load());
    return () => dispatch(unload());
  }, [dispatch]);

  return (
    <>
      <p className="lead text-center">Chargement de la page en cours&hellip;</p>
      <div className="text-center">
        <FontAwesomeIcon icon={faCircleNotch} spin size="3x" />
      </div>
    </>
  );
}
{'fraction_non_alphanumeric': 0.14584949573312644, 'fraction_numerical': 0.0007757951900698216, 'mean_word_length': 4.078740157480315, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 16, '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': '3875955', 'n_tokens_mistral': 398, 'n_tokens_neox': 390, 'n_words': 113}