(props: { questionText: string })
| 1 | import React from "react"; |
| 2 | |
| 3 | export default function QuestionText(props: { questionText: string }) { |
| 4 | return ( |
| 5 | <p> |
| 6 | {props.questionText |
| 7 | .split(/(\{\w+})/g) |
| 8 | .map((part: string, idx: number) => { |
| 9 | if (part.match(/\{(\w+)}/)) { |
| 10 | return ( |
| 11 | <span key={idx} className={"text-blue-500"}> |
| 12 | {part} |
| 13 | </span> |
| 14 | ); |
| 15 | } else { |
| 16 | return <span key={idx}>{part}</span>; |
| 17 | } |
| 18 | })} |
| 19 | </p> |
| 20 | ); |
| 21 | } |
nothing calls this directly
no outgoing calls
no test coverage detected