I have a landing page and a search page. The landing page has radio buttons that change the global state of boolean values. The idea is when I hit the search button on the landing, the app will take me to the search page with a dropdown list. I want the dropdown list's default value to be what was selected back on the landing page
function getServiceDropdown(){
if (props.houseSitting) {
return "isHome"
} else if (props.dropInVisits) {
return "isVisit"
}
<select defaultValue={getServiceDropdown}>
<option>Boarding</option>
<option value="isHome">Home Sitting</option>
<option value="isVisit">Drop-in Visits</option>
<option>Day Care</option>
<option>Dog Walking</option>
</select>