RFile.tsx 634 Bytes
Newer Older
1
2
3
4
5
6
7
import React, { Fragment } from "react";
import { baseImageUrl } from "../apis";

type Props = {
  question: any;
};

Jiwon Yoon's avatar
Jiwon Yoon committed
8
export const RFile = ({ question }: Props) => {
9
10
11
  console.log("question", question);
  return (
    <div className="m-5 flex justify-start items-center">
Jiwon Yoon's avatar
Jiwon Yoon committed
12
      {question.answers.map((answer: any, index: number) => (
13
14
15
16
17
18
19
20
21
22
23
24
25
        <Fragment key={index}>
          <img
            className="h-14"
            key={answer[0].url}
            alt="file"
            src={`${baseImageUrl}/${answer[0].url}`}
          />
          <div className="ml-3">{answer[0].name}</div>
        </Fragment>
      ))}
    </div>
  );
};