'use client' import {ReactNode} from 'react' import {merge} from '@/lib/utils' import {Tabs, TabsContent, TabsList, TabsTrigger} from '@/components/ui/tabs' import LongForm from '@/components/composites/purchase/long/form' import ShortForm from '@/components/composites/purchase/short/form' import {usePathname, useRouter, useSearchParams} from 'next/navigation' export type TabType = 'short' | 'long' | 'fixed' | 'custom' export default function Purchase() { const router = useRouter() const path = usePathname() const params = useSearchParams() const tab = params.get('type') as TabType || 'short' const updateTab = async (tab: string) => { const newParams = new URLSearchParams(params) newParams.set('type', tab) router.push(`${path}?${newParams.toString()}`) } return (
短效动态 长效静态 固定套餐 定制套餐
) } function Tab(props: { value: string children: ReactNode }) { return ( {props.children} ) }