Feat: add search params with theme in links of marketplace (#19648)

This commit is contained in:
KVOJJJin
2025-05-14 13:46:03 +08:00
committed by GitHub
parent 9dce0e40b5
commit 2c5f5b0c67
7 changed files with 22 additions and 9 deletions

View File

@@ -2,6 +2,7 @@ import {
useEffect,
useRef,
} from 'react'
import { useTheme } from 'next-themes'
import {
RiArrowRightUpLine,
RiArrowUpDoubleLine,
@@ -25,7 +26,7 @@ const Marketplace = ({
}: MarketplaceProps) => {
const locale = getLocaleOnClient()
const { t } = useTranslation()
const { theme } = useTheme()
const {
isLoading,
marketplaceCollections,
@@ -83,7 +84,7 @@ const Marketplace = ({
</span>
{t('common.operation.in')}
<a
href={`${MARKETPLACE_URL_PREFIX}?language=${locale}&q=${searchPluginText}&tags=${filterPluginTags.join(',')}`}
href={`${MARKETPLACE_URL_PREFIX}?language=${locale}&q=${searchPluginText}&tags=${filterPluginTags.join(',')}${theme ? `&theme=${theme}` : ''}`}
className='system-sm-medium ml-1 flex items-center text-text-accent'
target='_blank'
>