File size: 1,423 Bytes
372531f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import Image from "next/image";

interface SubQuestionsProps {
  metadata: string[];
  handleClickSuggestion: (value: string) => void;
}

const SubQuestions: React.FC<SubQuestionsProps> = ({ metadata, handleClickSuggestion }) => {
  return (
    <div className="container flex w-full items-start gap-3 pt-5 pb-2">

      <div className="flex w-fit items-center gap-4">

        <Image

          src={"/img/thinking.svg"}

          alt="thinking"

          width={30}

          height={30}

          className="size-[24px]"

        />

      </div>

      <div className="grow text-white">

        <p className="pr-5 font-bold leading-[152%] text-white pb-[20px]">

          Pondering your question from several angles

        </p>

        <div className="flex flex-row flex-wrap items-center gap-2.5 pb-[20px]">

          {metadata.map((item, subIndex) => (

            <div

              className="flex cursor-pointer items-center justify-center gap-[5px] rounded-full border border-solid border-[#C1C1C1] bg-[#EDEDEA] px-2.5 py-2"

              onClick={() => handleClickSuggestion(item)}

              key={`${item}-${subIndex}`}

            >

              <span className="text-sm font-light leading-[normal] text-[#1B1B16]">

                {item}

              </span>

            </div>

          ))}

        </div>

      </div>

    </div>
  );
};

export default SubQuestions;