mirror of
https://github.com/pds-nest/nest.git
synced 2024-11-22 13:04:19 +00:00
22 lines
613 B
JavaScript
22 lines
613 B
JavaScript
import React, { useContext } from "react"
|
|
import BoxWordcloud from "../base/BoxWordcloud"
|
|
import ContextLanguage from "../../contexts/ContextLanguage"
|
|
import BoxFull from "../base/BoxFull"
|
|
import Empty from "./Empty"
|
|
|
|
|
|
export default function BoxVisualizationWordcloud({ words, ...props }) {
|
|
const { strings } = useContext(ContextLanguage)
|
|
|
|
if(words.length === 0) {
|
|
return (
|
|
<BoxFull header={strings.wordcloud} {...props}>
|
|
<Empty/>
|
|
</BoxFull>
|
|
)
|
|
}
|
|
|
|
return (
|
|
<BoxWordcloud header={strings.wordcloud} words={words} {...props}/>
|
|
)
|
|
}
|