[bug fix][xs]: some datasets may not have owner organization.
This commit is contained in:
@@ -40,17 +40,19 @@ function Recent() {
|
|||||||
<section className="my-10 mx-4 lg:my-20">
|
<section className="my-10 mx-4 lg:my-20">
|
||||||
<h1 className="text-2xl font-thin mb-4">Recent Datasets</h1>
|
<h1 className="text-2xl font-thin mb-4">Recent Datasets</h1>
|
||||||
<div className="flex flex-col lg:flex-row">
|
<div className="flex flex-col lg:flex-row">
|
||||||
{result.results.map((resource, index) => (
|
{result.results.map((dataset, index) => (
|
||||||
<div
|
<div
|
||||||
key={index}
|
key={index}
|
||||||
className="border px-4 mb-4 mr-3 border-gray-100 w-5/6 shadow-sm"
|
className="border px-4 mb-4 mr-3 border-gray-100 w-5/6 shadow-sm"
|
||||||
>
|
>
|
||||||
<h1 className="text-2xl font-thin">{resource.title}</h1>
|
<h1 className="text-2xl font-thin">{dataset.title}</h1>
|
||||||
<p className="text-gray-500">{resource.organization.description}</p>
|
<p className="text-gray-500">
|
||||||
|
{dataset.organization && dataset.organization.description}
|
||||||
|
</p>
|
||||||
<Link
|
<Link
|
||||||
href={`/@${
|
href={`/@${
|
||||||
resource.organization ? resource.organization.name : 'dataset'
|
dataset.organization ? dataset.organization.name : 'dataset'
|
||||||
}/${resource.name}`}
|
}/${dataset.name}`}
|
||||||
>
|
>
|
||||||
<a className="pt-3 flex justify-end text-orange-500">
|
<a className="pt-3 flex justify-end text-orange-500">
|
||||||
View Dataset
|
View Dataset
|
||||||
|
|||||||
Reference in New Issue
Block a user