diff --git a/src/components/HomeCards/index.js b/src/components/HomeCards/index.js index bde590c..cd8d434 100644 --- a/src/components/HomeCards/index.js +++ b/src/components/HomeCards/index.js @@ -1,35 +1,12 @@ -import {useEffect, useState} from 'react'; import Link from '@docusaurus/Link'; -import CodeBlock from '@theme/CodeBlock'; -import {PLATFORMS, detectPlatform} from '@site/src/lib/installer'; import styles from './styles.module.css'; -function quickStartSnippet(command) { - return `# Install\n${command}\n\n# Debug\nphp your-script.php`; -} - -/* Shows the command for the visitor's own OS. The page is prerendered without - knowing it, so this starts on the Unix command and corrects itself after - mounting -- detecting in an effect rather than during render keeps the first - client render identical to the server's, which is what hydration compares. */ -function QuickStartSnippet() { - const [platform, setPlatform] = useState('macos'); - - useEffect(() => { - const detected = detectPlatform(); - if (detected) { - setPlatform(detected); - } - }, []); - - const active = PLATFORMS.find((p) => p.id === platform) ?? PLATFORMS[0]; - - return ( - - {quickStartSnippet(active.command)} - - ); -} +const quickStartSteps = [ + 'Install it with one command', + 'Start your editor listening', + 'Set a breakpoint', + 'Run your code as usual', +]; const keyFeatures = [ 'Always on — no trigger to set', @@ -65,9 +42,15 @@ export default function HomeCards() { title="Quick Start" linkTo="/getting-started/quick-start" linkLabel="View quick start guide"> -

Install it. There is nothing to configure.

- -

Start your editor listening, set a breakpoint, run your code.

+

Four steps, and nothing to configure.

+
    + {quickStartSteps.map((step, i) => ( +
  1. + {i + 1} + {step} +
  2. + ))} +