fix: marketplace card link

pull/12372/head
StyleZhang 2 years ago
parent 3efc6c5050
commit 84a3fe85c8

@ -48,19 +48,19 @@ const CardWrapper = ({
<div className='hidden absolute bottom-0 group-hover:flex items-center space-x-2 px-4 pt-8 pb-4 w-full bg-gradient-to-tr from-[#f9fafb] to-[rgba(249,250,251,0)] rounded-b-xl'> <div className='hidden absolute bottom-0 group-hover:flex items-center space-x-2 px-4 pt-8 pb-4 w-full bg-gradient-to-tr from-[#f9fafb] to-[rgba(249,250,251,0)] rounded-b-xl'>
<Button <Button
variant='primary' variant='primary'
className='flex-1' className='w-[calc(50%-4px)]'
onClick={showInstallFromMarketplace} onClick={showInstallFromMarketplace}
> >
{t('plugin.detailPanel.operation.install')} {t('plugin.detailPanel.operation.install')}
</Button> </Button>
<a href={`${MARKETPLACE_URL_PREFIX}/plugins/${plugin.org}/${plugin.name}?language=${localeFromLocale}`} target='_blank' className='block flex-1 shrink-0 w-[calc(50%-4px)]'>
<Button <Button
className='flex-1' className='w-full gap-0.5'
> >
<a href={`${MARKETPLACE_URL_PREFIX}/plugins/${plugin.org}/${plugin.name}?language=${localeFromLocale}`} target='_blank' className='flex items-center gap-0.5'>
{t('plugin.detailPanel.operation.detail')} {t('plugin.detailPanel.operation.detail')}
<RiArrowRightUpLine className='ml-1 w-4 h-4' /> <RiArrowRightUpLine className='ml-1 w-4 h-4' />
</a>
</Button> </Button>
</a>
</div> </div>
) )
} }
@ -94,27 +94,6 @@ const CardWrapper = ({
/> />
} }
/> />
{
showInstallButton && (
<div className='hidden absolute bottom-0 group-hover:flex items-center space-x-2 px-4 pt-8 pb-4 w-full bg-gradient-to-tr from-[#f9fafb] to-[rgba(249,250,251,0)] rounded-b-xl'>
<Button
variant='primary'
className='flex-1'
onClick={showInstallFromMarketplace}
>
{t('plugin.detailPanel.operation.install')}
</Button>
<Button
className='flex-1'
>
<a href={`${MARKETPLACE_URL_PREFIX}/plugins/${plugin.org}/${plugin.name}`} target='_blank' className='flex items-center gap-0.5'>
{t('plugin.detailPanel.operation.detail')}
<RiArrowRightUpLine className='ml-1 w-4 h-4' />
</a>
</Button>
</div>
)
}
</a> </a>
) )
} }

Loading…
Cancel
Save