Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
sverhoeven committed Feb 16, 2024
1 parent 8a6d629 commit bd6a99c
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions app/caprieval/CaprievalReport.client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,22 @@ import type { CaprievalData } from "./caprieval.server";

export const CaprievalReport = ({ scatters, boxes, table }: CaprievalData) => {
const [searchParams, setSearchParams] = useSearchParams();
const hasOtherCluster = "clusters" in table && table.clusters.some((c) => c['cluster_id'] === "Other");
const hasOtherCluster =
"clusters" in table &&
table.clusters.some((c) => c["cluster_id"] === "Other");
return (
<div className="caprieval-report flex flex-col gap-4">
{"clusters" in table ? (
<ClusterTable {...table} />
) : (
<>
<StructureTable {...table} />
{hasOtherCluster && <div>The &quot;Other&quot; cluster is not a real cluster it contains all structures that are not in the top 9 clusters.</div>}
<StructureTable {...table} />
{hasOtherCluster && (
<div>
The &quot;Other&quot; cluster is not a real cluster it contains
all structures that are not in the top 9 clusters.
</div>
)}
</>
)}
<ScatterPlots
Expand Down

0 comments on commit bd6a99c

Please sign in to comment.