Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: placeholder image for data views #986

Merged
merged 1 commit into from
Jan 10, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 13 additions & 16 deletions apps/web/partials/blocks/table/table-block-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import * as React from 'react';
import { useState } from 'react';

import { Filter } from '~/core/blocks-sdk/table';
import { PLACEHOLDER_SPACE_IMAGE } from '~/core/constants';
import { useRelations } from '~/core/database/relations';
import { useTriples } from '~/core/database/triples';
import { DB } from '~/core/database/write';
Expand Down Expand Up @@ -433,14 +434,12 @@ export const TableBlockTable = React.memo(
<div key={index}>
<Link href={href} className="group inline-flex items-center gap-6 pr-6">
<div className="relative h-20 w-20 flex-shrink-0 overflow-clip rounded-lg bg-grey-01">
{image && (
<Image
src={getImagePath(image)}
className="object-cover transition-transform duration-150 ease-in-out group-hover:scale-105"
alt=""
fill
/>
)}
<Image
src={image ? getImagePath(image) : PLACEHOLDER_SPACE_IMAGE}
className="object-cover transition-transform duration-150 ease-in-out group-hover:scale-105"
alt=""
fill
/>
</div>
<div>
<div className="flex items-center gap-2">
Expand Down Expand Up @@ -470,14 +469,12 @@ export const TableBlockTable = React.memo(
return (
<Link key={index} href={href} className="group flex flex-col gap-3">
<div className="relative aspect-[2/1] w-full overflow-clip rounded-lg bg-grey-01">
{image && (
<Image
src={getImagePath(image)}
className="object-cover transition-transform duration-150 ease-in-out group-hover:scale-105"
alt=""
fill
/>
)}
<Image
src={image ? getImagePath(image) : PLACEHOLDER_SPACE_IMAGE}
className="object-cover transition-transform duration-150 ease-in-out group-hover:scale-105"
alt=""
fill
/>
</div>
<div className="flex items-center gap-2">
{verified && (
Expand Down
Loading