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: show a preview of the url in the cid page. #85

Open
wants to merge 1 commit into
base: old-main
Choose a base branch
from
Open
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
13 changes: 8 additions & 5 deletions src/app/space/[did]/root/[cid]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,20 @@ export default function ItemPage ({ params }: PageProps): JSX.Element {
{root.toString()}
<CopyIcon text={root.toString()} />
</div>
<H2>URL</H2>
<div className="pb-5 overflow-hidden no-wrap text-ellipsis">
<a href={url} className="font-mono text-sm underline m-0 p-0">{url}</a>
<CopyIcon text={url} />
</div>
<H2>Shards</H2>
<div className='pb-5'>
{upload.isLoading
? <DefaultLoader className='w-5 h-5 inline-block' />
: upload.data?.shards?.map(link => <Shard space={space.did()} root={root} shard={link} key={link.toString()} />)}
</div>
<H2>URL</H2>
<div className='bg-white bg-opacity-30 rounded max-w-4xl shadow-inner'>
<div className="p-2 overflow-hidden no-wrap text-ellipsis">
<a href={url} className="font-mono text-sm underline m-0 p-0">{url}</a>
<CopyIcon text={url} />
</div>
<iframe src={url} className='w-full h-72 bg-white' inert='inert'></iframe>
</div>
</div>
)
}
Expand Down