in dashboard/client/src/GithubIssueList.tsx [359:413]
function GithubIssueListBody(props: {
data?: GithubIssueListData;
loading: boolean;
error?: any;
changeActionOwner: (actionOwner: string) => void;
filterByLabel: (label: string) => void;
}) {
const data = props.data;
if (props.loading) {
return (
<div className="flex justify-center py-8">
<Loading />
</div>
);
}
if (props.error || !data || !data.items) {
return <div className="p-4">Error</div>;
}
if (data.items.length == 0) {
return (
<div className="flex flex-col items-center p-12">
<svg
xmlns="http://www.w3.org/2000/svg"
className="h-8 w-8 text-gray-300"
viewBox="0 0 24 24"
fill="currentColor"
>
<path d="M12 7a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0112 7zm1 9a1 1 0 11-2 0 1 1 0 012 0z" />
<path
fillRule="evenodd"
d="M12 1C5.925 1 1 5.925 1 12s4.925 11 11 11 11-4.925 11-11S18.075 1 12 1zM2.5 12a9.5 9.5 0 1119 0 9.5 9.5 0 01-19 0z"
/>
</svg>
<div className="text-xl font-medium mt-4">No results found.</div>
</div>
);
}
return (
<div className="flex flex-col">
{data.items.map((item) => (
<div key={item.data.id} className="border-t hover:bg-gray-100">
<ListItem
item={item}
changeActionOwner={props.changeActionOwner}
filterByLabel={props.filterByLabel}
/>
</div>
))}
</div>
);
}