Skip to content

Commit

Permalink
chore: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
luizakp committed Aug 19, 2024
1 parent c04d9fc commit 6e5e41b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/DataTable/SWRDataTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,18 +115,19 @@ export const renderDataTableCell = ({ filters, column, row, selectedRows }) => {
case "actions":
return <DataTableRowActions row={row} column={column} />;
case "image":
// eslint-disable-next-line no-case-declarations
const image = row.getValue("image") || value;
if (image?.url){
if (image?.url) {
return (
<img
className="aspect-ratio-1 size-16 rounded-sm object-contain"
src={image.url}
alt={image.alt_text}
/>
);
} else {
return <div className="max-w-[400px] truncate">{value}</div>;
}
return <div className="max-w-[400px] truncate">{value}</div>;

case "link":
// eslint-disable-next-line no-case-declarations
const url = row.getValue("details_url");
Expand Down

0 comments on commit 6e5e41b

Please sign in to comment.