'use client'; import { useTranslations } from 'next-intl'; import * as React from 'react'; import Link from 'next/link'; import { cn } from '@/lib/utils'; import { motion } from 'motion/react'; import { Button } from '@/components/ui/button'; import { Book, Check, Copy, Terminal } from 'lucide-react'; export interface DeveloperSectionProps { className?: string; } /** * Developer Section - 开发者体验展示 */ export const DeveloperSection = React.memo(function DeveloperSection({ className, }: DeveloperSectionProps) { const rt = useTranslations('runtime'); const [copied, setCopied] = React.useState(false); const codeContent = rt.raw('register_a_user_curl_x_post_https_4ae682b0'); const onCopy = async () => { try { await navigator.clipboard.writeText(codeContent); setCopied(true); setTimeout(() => setCopied(false), 2000); } catch { // Fallback for older browsers const textArea = document.createElement('textarea'); textArea.value = codeContent; textArea.style.position = 'fixed'; textArea.style.left = '-9999px'; document.body.appendChild(textArea); textArea.select(); document.execCommand('copy'); document.body.removeChild(textArea); setCopied(true); setTimeout(() => setCopied(false), 2000); } }; return (
bash
                
                  
                    {rt('quick_start_42fbb067')}
                  
                  {'\n'}
                  curl -X{' '}
                  POST{' '}
                  
                    https://api.example.com/api/v1/auth/register
                  {' '}
                  \{'\n'}
                  {'  '}-H{' '}
                  
                    "Content-Type: application/json"
                  {' '}
                  \{'\n'}
                  {'  '}-d{' '}
                  
                    "username=dev&password=***"
                  
                
              

{rt('developer_friendly_40c2a4ce')}
{rt('quick_to_integrate_18cbee8a')}

{rt( 'standard_restful_apis_complete_typescript_types_detailed_6369a0e2', )}

    {[ rt('restful_api_with_clear_understandable_semantics_1fa9d6f5'), rt('openapi_swagger_documentation_ccbcbc84'), rt('developer_friendly_typescript_type_definitions_910a7909'), rt('code_samples_and_integration_guides_9e998a5a'), ].map((item, i) => (
  • {item}
  • ))}
); });