fix: Deal with questions with no options
Like https://metaforecast.org/questions/metaculus-6326
This commit is contained in:
parent
020f0c0c5e
commit
40c6f57c11
|
@ -91,7 +91,8 @@ const LargeQuestionCard: React.FC<{
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="mb-10">
|
<div className="mb-10">
|
||||||
{question.platform.id === "guesstimate" && question.visualization ? (
|
{
|
||||||
|
question.platform.id === "guesstimate" && question.visualization ? (
|
||||||
<a className="no-underline" href={question.url} target="_blank">
|
<a className="no-underline" href={question.url} target="_blank">
|
||||||
<img
|
<img
|
||||||
className="rounded-sm"
|
className="rounded-sm"
|
||||||
|
@ -99,9 +100,10 @@ const LargeQuestionCard: React.FC<{
|
||||||
alt="Guesstimate Screenshot"
|
alt="Guesstimate Screenshot"
|
||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
) : (
|
) : question.options.length > 0 ? (
|
||||||
<HistoryChart question={question} />
|
<HistoryChart question={question} />
|
||||||
)}
|
) : null /* Don't display chart if there are no options, for now. */
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="mx-auto max-w-prose">
|
<div className="mx-auto max-w-prose">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user