constrain javascript os matches to available tabs

This commit is contained in:
Kenneth Bingham 2023-11-27 22:53:03 -05:00
parent ddb6361b8b
commit 50a72d19cd
No known key found for this signature in database
GPG Key ID: 31709281860130B6

View File

@ -7,11 +7,11 @@ function OsTabs(props) {
useEffect(() => {
// Based on the OS or any other client-side condition, set the default value
const tabs = ['iOS', 'Android', 'Mac OS', 'Windows', 'Linux']
const tabs = ['Mac OS', 'Windows', 'Linux']
if (tabs.includes(osName)) {
setDefaultValue(osName);
} else {
setDefaultValue('Windows');
setDefaultValue('Linux');
}
}, []); // The empty dependency array ensures this runs once after component mount