fix: 新手教程修改地址,注册表单修改form传值
This commit is contained in:
@@ -18,6 +18,7 @@ interface Item {
|
||||
title: string;
|
||||
updated_at?: string;
|
||||
icon?: string;
|
||||
download?: string;
|
||||
}
|
||||
export function TutorialButton({ items }: { items: Item[] }) {
|
||||
const t = useTranslations('document');
|
||||
@@ -120,7 +121,6 @@ export function TutorialButton({ items }: { items: Item[] }) {
|
||||
<motion.div
|
||||
layoutId={`card-${item.title}-${id}`}
|
||||
key={`card-${item.title}-${id}`}
|
||||
onClick={() => setActive(item)}
|
||||
className='bg-background hover:bg-accent flex cursor-pointer items-center justify-between rounded-[40px] border p-1 sm:p-4'
|
||||
>
|
||||
<div className='flex flex-row items-center gap-4'>
|
||||
@@ -149,17 +149,34 @@ export function TutorialButton({ items }: { items: Item[] }) {
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<motion.button
|
||||
layoutId={`button-${item.title}-${id}`}
|
||||
className={cn(
|
||||
buttonVariants({
|
||||
variant: 'primary',
|
||||
}),
|
||||
'sm:min-w-[100px]',
|
||||
)}
|
||||
>
|
||||
{t('read')}
|
||||
</motion.button>
|
||||
<div>
|
||||
{item.download ? (
|
||||
<a
|
||||
className={cn(
|
||||
buttonVariants({
|
||||
variant: 'default',
|
||||
}),
|
||||
'mr-2 bg-[#EAEAEA] px-3 text-[#225BA9] hover:text-white sm:min-w-[80px]',
|
||||
)}
|
||||
href={item.download}
|
||||
target='_blank'
|
||||
>
|
||||
官方下载
|
||||
</a>
|
||||
) : null}
|
||||
<motion.button
|
||||
layoutId={`button-${item.title}-${id}`}
|
||||
onClick={() => setActive(item)}
|
||||
className={cn(
|
||||
buttonVariants({
|
||||
variant: 'primary',
|
||||
}),
|
||||
'px-3 sm:min-w-[80px]',
|
||||
)}
|
||||
>
|
||||
{t('read')}
|
||||
</motion.button>
|
||||
</div>
|
||||
</motion.div>
|
||||
))}
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user