select tab 'Docker' unless OS is Linux

This commit is contained in:
Kenneth Bingham 2024-05-21 12:06:30 -04:00
parent f11819fe73
commit 1d68d9c025
No known key found for this signature in database
GPG Key ID: 31709281860130B6
2 changed files with 5 additions and 3 deletions

View File

@ -32,6 +32,8 @@ zrok frontends are the parts of zrok that proxy incoming public web traffic to z
Choose between installing the Linux package or running zrok with Docker (Linux, macOS, or Windows). Choose between installing the Linux package or running zrok with Docker (Linux, macOS, or Windows).
{/* The OsTabs component must be aligned with these specific values: `Linux`, `Docker` which are auto-selected based on
the detected OS of the visitor's browser */}
<OsTabs <OsTabs
queryString="os" queryString="os"
values={[ values={[

View File

@ -7,9 +7,9 @@ function OsTabs(props) {
useEffect(() => { useEffect(() => {
// Based on the OS or any other client-side condition, set the default value // Based on the OS or any other client-side condition, set the default value
const tabs = ['Mac OS', 'Windows', 'Linux'] const dockerTabs = ['Mac OS', 'Windows']
if (tabs.includes(osName)) { if (dockerTabs.includes(osName)) {
setDefaultValue(osName); setDefaultValue('Docker');
} else { } else {
setDefaultValue('Linux'); setDefaultValue('Linux');
} }