diff --git a/nest_frontend/components/interactive/BoxWordcloud.js b/nest_frontend/components/interactive/BoxWordcloud.js index 1185e72..93809a6 100644 --- a/nest_frontend/components/interactive/BoxWordcloud.js +++ b/nest_frontend/components/interactive/BoxWordcloud.js @@ -3,7 +3,15 @@ import BoxFull from "../base/BoxFull" import ReactWordcloud from "react-wordcloud" -export default function BoxWordcloud({ ...props }) { +/** + * A Box which displays a wordcloud. + * + * @param words - A list of word objects, made of a string "text" and a number "value" + * @param props - Additional props to pass to the box. + * @returns {JSX.Element} + * @constructor + */ +export default function BoxWordcloud({ words, props }) { return (
@@ -17,24 +25,7 @@ export default function BoxWordcloud({ ...props }) { size: undefined, deterministic: true, }} - words={[ - { - text: "noi", - value: 1 - }, - { - text: "estraiamo", - value: 1 - }, - { - text: "statistiche", - value: 1 - }, - { - text: "tweet", - value: 1 - }, - ]} + words={words} />