fix: use NextJS basePath and WEB_PREFIX to support custom prefix (#19497)

Co-authored-by: johnny0120 <15564476+johnny0120@users.noreply.github.com>
This commit is contained in:
johnny0120
2025-05-12 13:44:41 +08:00
committed by GitHub
parent d1c55cb901
commit 49af07f444
33 changed files with 87 additions and 69 deletions

View File

@@ -2,7 +2,7 @@ import {
memo,
useCallback,
} from 'react'
import { basePath } from '@/utils/var'
import Link from 'next/link'
import { useTranslation } from 'react-i18next'
import {
RiAddLine,
@@ -54,7 +54,7 @@ const Blocks = ({
>
<div className='flex h-[22px] w-full items-center justify-between pl-3 pr-1 text-xs font-medium text-gray-500'>
{toolWithProvider.label[language]}
<a className='hidden cursor-pointer items-center group-hover:flex' href={`${basePath}/tools?category=${toolWithProvider.type}`} target='_blank'>{t('tools.addToolModal.manageInTools')}<ArrowUpRight className='ml-0.5 h-3 w-3' /></a>
<Link className='hidden cursor-pointer items-center group-hover:flex' href={`/tools?category=${toolWithProvider.type}`} target='_blank'>{t('tools.addToolModal.manageInTools')}<ArrowUpRight className='ml-0.5 h-3 w-3' /></Link>
</div>
{list.map((tool) => {
const labelContent = (() => {