<commit_before>import React, { useState, useEffect } from 'react';
import { Helmet } from 'react-helmet';
import { graphql } from 'gatsby';
import rehypeReact from 'rehype-react';
import Gifffer from 'gifffer';
import classnames from 'classnames';
import ExampleRunner from '../components/example-runner/ExampleRunner';
import SideMenu from '../components/SideMenu';
import processFrameworkSpecificSections from '../utils/framework-specific-sections';
import { getPageName } from '../utils/get-page-name';
import { ApiDocumentation } from '../components/ApiDocumentation';
import IconsPanel from '../components/IconsPanel';
import ImageCaption from '../components/ImageCaption';
import styles from './doc-page.module.scss';
import MatrixTable from '../components/MatrixTable';
import VideoSection from '../components/VideoSection';
import VideoLink from '../components/VideoLink';
import ChartGallery from '../components/chart-gallery/ChartGallery';
import ChartsApiExplorer from '../components/charts-api-explorer/ChartsApiExplorer';
import { ListItem } from '../components/ListItem';
import Gif from '../components/Gif';

const DocPageTemplate = ({ data, pageContext: { framework }, location }) => {
  const { markdownRemark: page } = data;
  const [showSideMenu, setShowSideMenu] = useState(true);

  useEffect(() => Gifffer(), []);

  if (!page) { return null; }

  const pageName = getPageName(location.pathname);
  const ast = processFrameworkSpecificSections(page.htmlAst, framework);
  const getExampleRunnerProps = (props, library) => ({
    ...props,
    framework,
    pageName,
    library,
    options: props.options != null ? JSON.parse(props.options) : undefined
  });

  const renderAst = new rehypeReact({
    createElement: React.createElement,
    fragment: true,
    components: {
      'li': ListItem,
      'gif': props => Gif({ ...props, pageName }),
      'grid-example': props => ExampleRunner(getExampleRunnerProps(props, 'grid')),<commit_msg>AG-4843 - fixed effect function warning<commit_after>import React, { useState, useEffect } from 'react';
import { Helmet } from 'react-helmet';
import { graphql } from 'gatsby';
import rehypeReact from 'rehype-react';
import Gifffer from 'gifffer';
import classnames from 'classnames';
import ExampleRunner from '../components/example-runner/ExampleRunner';
import SideMenu from '../components/SideMenu';
import processFrameworkSpecificSections from '../utils/framework-specific-sections';
import { getPageName } from '../utils/get-page-name';
import { ApiDocumentation } from '../components/ApiDocumentation';
import IconsPanel from '../components/IconsPanel';
import ImageCaption from '../components/ImageCaption';
import styles from './doc-page.module.scss';
import MatrixTable from '../components/MatrixTable';
import VideoSection from '../components/VideoSection';
import VideoLink from '../components/VideoLink';
import ChartGallery from '../components/chart-gallery/ChartGallery';
import ChartsApiExplorer from '../components/charts-api-explorer/ChartsApiExplorer';
import { ListItem } from '../components/ListItem';
import Gif from '../components/Gif';

const DocPageTemplate = ({ data, pageContext: { framework }, location }) => {
  const { markdownRemark: page } = data;
  const [showSideMenu, setShowSideMenu] = useState(true);

  useEffect(() => { Gifffer(); }, []);

  if (!page) { return null; }

  const pageName = getPageName(location.pathname);
  const ast = processFrameworkSpecificSections(page.htmlAst, framework);
  const getExampleRunnerProps = (props, library) => ({
    ...props,
    framework,
    pageName,
    library,
    options: props.options != null ? JSON.parse(props.options) : undefined
  });

  const renderAst = new rehypeReact({
    createElement: React.createElement,
    fragment: true,
    components: {
      'li': ListItem,
      'gif': props => Gif({ ...props, pageName }),
      'grid-example': props => ExampleRunner(getExampleRunnerProps(props, 'grid')),
{'fraction_non_alphanumeric': 0.14134542705971279, 'fraction_numerical': 0.0010078105316200555, 'mean_word_length': 4.655270655270655, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '3956384', 'n_tokens_mistral': 1113, 'n_tokens_neox': 1090, 'n_words': 295}