mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
24 lines
703 B
JavaScript
24 lines
703 B
JavaScript
import React from "react";
|
|
import CodeBlock from '@theme/CodeBlock';
|
|
import BrowserOnly from '@docusaurus/BrowserOnly';
|
|
|
|
export default function InstallBlock() {
|
|
return (
|
|
<BrowserOnly fallback={<div>Loading...</div>}>
|
|
{() => {
|
|
if (window.posthog && typeof window.posthog.get_distinct_id === "function") {
|
|
const distinct_id = window.posthog.get_distinct_id()
|
|
} else {
|
|
const distinct_id = "posthog-blocked"
|
|
}
|
|
|
|
return (
|
|
<CodeBlock language="bash">
|
|
{`bash <(curl -fsSL https://github.com/firezone/firezone/raw/master/scripts/install.sh) ${distinct_id}`}
|
|
</CodeBlock>
|
|
)
|
|
}}
|
|
</BrowserOnly>
|
|
)
|
|
}
|