fix: image url not loaded right

This commit is contained in:
Joel
2026-03-09 11:10:40 +08:00
parent 7ccdc30133
commit ce720b331a

View File

@ -9,7 +9,11 @@ type WithIconItemProps = WithIconCardItemProps & {
function WithIconCardItem({ icon, children }: WithIconItemProps) {
return (
<div className="flex h-11 items-center space-x-3 rounded-lg bg-background-section px-2">
<Image src={decodeURIComponent(icon)} className="!border-none object-contain" alt="icon" width={40} height={40} />
{/*
* unoptimized to "url parameter is not allowed" for external domains despite correct remotePatterns configuration.
* https://github.com/vercel/next.js/issues/88873
*/}
<Image src={icon} className="!border-none object-contain" alt="icon" width={40} height={40} unoptimized />
<div className="min-w-0 grow overflow-hidden text-text-secondary system-sm-medium [&_p]:!m-0 [&_p]:block [&_p]:w-full [&_p]:overflow-hidden [&_p]:text-ellipsis [&_p]:whitespace-nowrap">
{children}
</div>