Skip to content

Commit

Permalink
Update image source and alt text in EmptyState
Browse files Browse the repository at this point in the history
component
  • Loading branch information
Jennievon committed Dec 18, 2023
1 parent c809bbb commit 648913a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
3 changes: 2 additions & 1 deletion tools/obscuroscan_v3/frontend/pages/address/[address].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ const AddressDetails = () => {
<EmptyState
title="Address Details"
description="Coming soon..."
image="/assets/images/clock.png"
imageSrc="/assets/images/clock.png"
imageAlt="Clock"
action={<Button onClick={() => push("/")}>Go Home</Button>}
/>
</Layout>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,25 @@ const EmptyState = ({
title,
description,
icon,
image,
imageSrc,
imageAlt,
action,
}: {
title?: string;
description?: string;
icon?: React.ReactNode;
image?: string;
imageSrc?: string;
imageAlt?: string;
action?: React.ReactNode;
}) => {
return (
<div className="flex flex-col items-center justify-center h-full">
<div className="flex flex-col items-center justify-center space-y-4">
{icon && <div className="w-24 h-24">{icon}</div>}
{image && (
{imageSrc && (
<img
src={image}
alt="Empty state"
src={imageSrc}
alt={imageAlt || "Empty state"}
className="w-24 h-24 rounded-full"
/>
)}
Expand Down

0 comments on commit 648913a

Please sign in to comment.