({ children }: React.ComponentProps<typeof Tabs>)
| 5 | import { useConfig } from "@/hooks/use-config"; |
| 6 | |
| 7 | export function CodeTabs({ children }: React.ComponentProps<typeof Tabs>) { |
| 8 | const [config, setConfig] = useConfig(); |
| 9 | |
| 10 | const installationType = React.useMemo(() => { |
| 11 | return config.installationType || "cli"; |
| 12 | }, [config]); |
| 13 | |
| 14 | return ( |
| 15 | <Tabs |
| 16 | className="relative mt-6 w-full" |
| 17 | onValueChange={(value) => |
| 18 | setConfig({ ...config, installationType: value as "cli" | "manual" }) |
| 19 | } |
| 20 | value={installationType} |
| 21 | > |
| 22 | {children} |
| 23 | </Tabs> |
| 24 | ); |
| 25 | } |
nothing calls this directly
no test coverage detected