diff --git a/src/components/Tabs/StartTab.jsx b/src/components/Tabs/StartTab.jsx index 1f729ea7..53e29217 100644 --- a/src/components/Tabs/StartTab.jsx +++ b/src/components/Tabs/StartTab.jsx @@ -34,7 +34,12 @@ const StartTab = ({ disabled, record, updateRecord, handleUpdateRecord, userID } const regionInfo = regions[region]; const [showShareRecord, setShowShareRecord] = useState(false) const mounted = useRef(false); - const themes = themesList[0].find(e => e === language); + const themes = themesList.find(e => e === language); + if (themes) { + const theme = themes[language]; + } + + const updateResourceType = (value) => { if(Array.isArray(value) && value.length === 1 && value.includes('other')){ @@ -283,7 +288,7 @@ const StartTab = ({ disabled, record, updateRecord, handleUpdateRecord, userID } defaultValue="oceanographic" onChange={(v) => updateResourceType(v)} options={["oceanographic", "biological", "other"]} - optionLabels={themes} + optionLabels={theme} disabled={disabled} />