<commit_before>import React from "react";
import styled from "styled-components";
import { graphql, useStaticQuery } from "gatsby";
// Type
import { FAQType } from "@type/FAQ";
// Components
import { DropdownItem, EButton, TitleSet } from "components";
// Assets
import { SUBTITLE, TITLE, COURSE_TPL } from "assets/static/phrases";
// Utils
import { strainMdxInfo } from "lib/utils";

type faq = {
  course?: "masters" | "javascript";
};

const FAQ: React.FC<faq> = ({ course }) => {
  const { lists } = strainMdxInfo(useStaticQuery(FAQListQuery));

  const faqList = course
    ? lists.filter((list: FAQType) => list.course === COURSE_TPL[course])
    : lists;

  const [faqCount, setFAQCount] = React.useState(faqList.length > 5 ? 5 : faqList.length);

  const handleMoreButtonClick = () => {
    if (faqCount + 5 <= faqList.length) {
      setFAQCount(faqCount + 5);
      return;
    }

    setFAQCount(faqList.length);<commit_msg>:label: FAQ 컴포넌트에 전달되는 props 타입에 대한 인터페이스명 변경<commit_after>import React from "react";
import styled from "styled-components";
import { graphql, useStaticQuery } from "gatsby";
// Type
import { FAQType } from "@type/FAQ";
// Components
import { DropdownItem, EButton, TitleSet } from "components";
// Assets
import { SUBTITLE, TITLE } from "assets/static/phrases";
// Utils
import { strainMdxInfo } from "lib/utils";

type IFaq = {
  course?: "masters" | "javascript";
};

const FAQ: React.FC<IFaq> = ({ course }) => {
  const { lists } = strainMdxInfo(useStaticQuery(FAQListQuery));

  const faqList = course ? lists.filter((list: FAQType) => list.course === course) : lists;

  const [faqCount, setFAQCount] = React.useState(faqList.length > 5 ? 5 : faqList.length);

  const handleMoreButtonClick = () => {
    if (faqCount + 5 <= faqList.length) {
      setFAQCount(faqCount + 5);
      return;
    }

    setFAQCount(faqList.length);
{'fraction_non_alphanumeric': 0.14797008547008547, 'fraction_numerical': 0.004273504273504274, 'mean_word_length': 4.03494623655914, 'pattern_counts': {'":': 0, '<': 7, '<?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': '2821179', 'n_tokens_mistral': 689, 'n_tokens_neox': 677, 'n_words': 154}