Skip to content

Commit

Permalink
removed placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
p32929 committed Apr 6, 2024
1 parent b6bb1a0 commit 7ddf32e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/components/custom/UrlList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem }
import { IMenuButtons } from '@/lib/Models';
import { Pencil, Trash } from 'lucide-react';
import { getHostFromURL } from '@/lib/utils';
import { LazyLoadImage } from 'react-lazy-load-image-component';

interface Props {

Expand Down Expand Up @@ -48,13 +49,18 @@ const UrlList: React.FC<Props> = (props) => {
< div className="p-4 grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-3 xl:grid-cols-4 gap-2" >
{
states.urls.map((item, urlIndex) => {
const imgUrl = `https://sporting-ivory-emu.faviconkit.com/${getHostFromURL(item.link)}/64`
// const imgUrl = `https://sporting-ivory-emu.faviconkit.com/${getHostFromURL(item.link)}/64`
const imgUrl = `https://favicon.yandex.net/favicon/${getHostFromURL(item.link)}?size=32`

return <ContextMenu key={urlIndex}>
<ContextMenuTrigger>
<a className="w-full" href={item.link}>
<Button className="w-full justify-start" variant="outline">
<img className='w-4 h-4 rounded-sm mr-3' src={imgUrl} />
<LazyLoadImage
id={`image-${urlIndex}`}
className='w-4 h-4 rounded-sm mr-3'
src={imgUrl}
/>
{item.title}
</Button>
</a>
Expand Down

0 comments on commit 7ddf32e

Please sign in to comment.