diff --git a/website3.0/pages/ResourcesPage.js b/website3.0/pages/ResourcesPage.js index 302bf0a3..3400cc80 100644 --- a/website3.0/pages/ResourcesPage.js +++ b/website3.0/pages/ResourcesPage.js @@ -31,18 +31,18 @@ const CustomDropdown = ({ const [currentValue, setCurrentValue] = useState(value); useEffect(() => { - setCurrentValue(value.charAt(0).toUpperCase() + value.slice(1)); + setCurrentValue(value[0].toUpperCase() + value.slice(1)); }, [value]); const handleOptionSelect = (option) => { if (typeof option === "object") { setCurrentValue( - option.value.charAt(0).toUpperCase() + option.value.slice(1) + option.value[0].toUpperCase() + option.value.slice(1) ); onSelect(option.value); onChange({ target: { value: option.value } }); } else if (typeof option === "string") { - setCurrentValue(option.charAt(0).toUpperCase() + option.slice(1)); + setCurrentValue(option[0].toUpperCase() + option.slice(1)); onSelect(option); onChange({ target: { value: option } }); } @@ -74,7 +74,7 @@ const CustomDropdown = ({ {dropdownOpen && (