Skip to content

Commit

Permalink
Fix conditional rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
krishaamer committed May 6, 2024
1 parent ed32617 commit 6ae74d7
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions components/origin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,22 @@ export default function Origin() {
}, [searchParams]);

return (
<div className="rounded-xl text-card-foreground border p-2 mt-2 mb-6">
<>
{reportID && origin.url && (
<span>
資料來源:
<a
href={origin.url}
target="_blank"
rel="noopener noreferrer"
className="link font-bold"
>
{getDomainFromURL(origin.url)}
</a>
</span>
<div className="rounded-xl text-card-foreground border p-2 mt-2 mb-6">
<span>
資料來源:
<a
href={origin.url}
target="_blank"
rel="noopener noreferrer"
className="link font-bold"
>
{getDomainFromURL(origin.url)}
</a>
</span>
</div>
)}
</div>
</>
);
}

0 comments on commit 6ae74d7

Please sign in to comment.