<commit_before>import React from 'react';
import { Components, registerComponent } from '../../lib/vulcan-lib';
import { useMulti } from '../../lib/crud/withMulti';
import { useLocation } from '../../lib/routeUtil';
import { TagRels } from '../../lib/collections/tagRels/collection';
import { useTagBySlug } from './useTag';
import Users from '../../lib/collections/users/collection';
import { Link } from '../../lib/reactRouterWrapper';
import { useCurrentUser } from '../common/withUser';
import { postBodyStyles } from '../../themes/stylePiping'
import {AnalyticsContext} from "../../lib/analyticsEvents";
import * as _ from 'underscore';

const styles = theme => ({
  description: {
    ...postBodyStyles(theme),
    marginBottom: 16,
  },
  loadMore: {
    flexGrow: 1,
    textAlign: "left"
  }
});

const TagPage = ({classes}: {
  classes: ClassesType
}) => {
  const { SingleColumnSection, SectionTitle, PostsList2, SectionButton, ContentItemBody, Loading, Error404, LoadMore } = Components;
  const currentUser = useCurrentUser();
  const { query, params } = useLocation();
  const { slug } = params;
  const { tag, loading: loadingTag } = useTagBySlug(slug);

  if (loadingTag)
    return <Loading/>
  if (!tag)
    return <Error404/>

  const terms = {
    ...query,
    filterSettings: {tags:[{tagId: "tNsqhzTibgGJKPEWB", tagName: "Coronavirus", filterMode: "Required"}]},
    view: "tagRelevance",
    limit: 15,
    itemsPerPage: 200,
    extraVariables: {
      tagId: 'String'
    },
    extraVariablesValues: {
      tagId: tag._id
    }
  }

  return <AnalyticsContext pageContext='tagPage' tagContext={tag.name}>
    <SingleColumnSection>
      <SectionTitle title={`${tag.name} Tag`}>
        {Users.isAdmin(currentUser) && <SectionButton>
          <Link to={`/tag/${tag.slug}/edit`}>Edit</Link>
        </SectionButton>}
      </SectionTitle>
      <ContentItemBody<commit_msg>fix deepscan<commit_after>import React from 'react';
import { Components, registerComponent } from '../../lib/vulcan-lib';
import { useLocation } from '../../lib/routeUtil';
import { useTagBySlug } from './useTag';
import Users from '../../lib/collections/users/collection';
import { Link } from '../../lib/reactRouterWrapper';
import { useCurrentUser } from '../common/withUser';
import { postBodyStyles } from '../../themes/stylePiping'
import {AnalyticsContext} from "../../lib/analyticsEvents";
import * as _ from 'underscore';

const styles = theme => ({
  description: {
    ...postBodyStyles(theme),
    marginBottom: 16,
  },
  loadMore: {
    flexGrow: 1,
    textAlign: "left"
  }
});

const TagPage = ({classes}: {
  classes: ClassesType
}) => {
  const { SingleColumnSection, SectionTitle, PostsList2, SectionButton, ContentItemBody, Loading, Error404 } = Components;
  const currentUser = useCurrentUser();
  const { query, params: { slug } } = useLocation();
  const { tag, loading: loadingTag } = useTagBySlug(slug);

  if (loadingTag)
    return <Loading/>
  if (!tag)
    return <Error404/>

  const terms = {
    ...query,
    filterSettings: {tags:[{tagId: "tNsqhzTibgGJKPEWB", tagName: "Coronavirus", filterMode: "Required"}]},
    view: "tagRelevance",
    limit: 15,
    itemsPerPage: 200,
    extraVariables: {
      tagId: 'String'
    },
    extraVariablesValues: {
      tagId: tag._id
    }
  }

  return <AnalyticsContext pageContext='tagPage' tagContext={tag.name}>
    <SingleColumnSection>
      <SectionTitle title={`${tag.name} Tag`}>
        {Users.isAdmin(currentUser) && <SectionButton>
          <Link to={`/tag/${tag.slug}/edit`}>Edit</Link>
        </SectionButton>}
      </SectionTitle>
      <ContentItemBody
{'fraction_non_alphanumeric': 0.1636064675253494, 'fraction_numerical': 0.00822143052891203, 'mean_word_length': 3.4242424242424243, 'pattern_counts': {'":': 0, '<': 25, '<?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': '3101030', 'n_tokens_mistral': 1171, 'n_tokens_neox': 1144, 'n_words': 261}