fix: handle deleted funds in trade and profile displays
Build Images and Deploy / Update-PROD-Stack (push) Successful in 1m20s
Build Images and Deploy / Update-PROD-Stack (push) Successful in 1m20s
This commit is contained in:
@@ -97,9 +97,13 @@ export default async function TradeHistoryPage({ searchParams }: PageProps) {
|
||||
: 'Account opened'}
|
||||
</span>
|
||||
) : isFundTrade ? (
|
||||
<Link href={`/fund/${t.fund!.slug}`} className="hover:text-indigo-300">
|
||||
{t.fund!.name}
|
||||
t.fund ? (
|
||||
<Link href={`/fund/${t.fund.slug}`} className="hover:text-indigo-300">
|
||||
{t.fund.name}
|
||||
</Link>
|
||||
) : (
|
||||
<span className="text-slate-500">Deleted Fund</span>
|
||||
)
|
||||
) : (
|
||||
<Link
|
||||
href={`/hashtag/${t.hashtag!.tag}`}
|
||||
|
||||
@@ -331,12 +331,16 @@ export default async function ProfilePage({ params }: Props) {
|
||||
: 'Account opened'}
|
||||
</span>
|
||||
) : isFundTrade ? (
|
||||
t.fund ? (
|
||||
<Link
|
||||
href={`/fund/${t.fund!.slug}`}
|
||||
href={`/fund/${t.fund.slug}`}
|
||||
className="text-indigo-300 hover:text-indigo-200 font-medium truncate flex-1 min-w-0"
|
||||
>
|
||||
{t.fund!.name}
|
||||
{t.fund.name}
|
||||
</Link>
|
||||
) : (
|
||||
<span className="text-slate-500 font-medium flex-1 min-w-0">Deleted Fund</span>
|
||||
)
|
||||
) : (
|
||||
<Link
|
||||
href={`/hashtag/${t.hashtag!.tag}`}
|
||||
|
||||
Reference in New Issue
Block a user