Skip to content

Commit

Permalink
replace DDG icon API with a better alternative
Browse files Browse the repository at this point in the history
  • Loading branch information
aelew committed Feb 6, 2024
1 parent 2130af9 commit 24e05b3
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 18 deletions.
2 changes: 1 addition & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const config = {
},
images: {
remotePatterns: [
{ protocol: 'https', hostname: 'icons.duckduckgo.com' },
{ protocol: 'https', hostname: 'favicon.victr.me' },
{ protocol: 'https', hostname: 'flagsapi.com' }
]
}
Expand Down
4 changes: 2 additions & 2 deletions src/app/(tools)/(domain)/_components/domain-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ export function DomainHeader({
<div className="my-4 flex flex-col-reverse items-center justify-between gap-4 sm:flex-row">
<div className="flex items-center gap-3 text-3xl font-semibold tracking-tight">
<Image
className="rounded-lg bg-white object-contain p-1 shadow ring-1 ring-muted-foreground/25"
src={`https://icons.duckduckgo.com/ip3/${domain}.ico`}
className="aspect-square rounded-lg bg-white object-contain p-1 shadow ring-1 ring-muted-foreground/25"
src={`https://favicon.victr.me/blob/https://${domain}`}
unoptimized
height={36}
width={36}
Expand Down
11 changes: 9 additions & 2 deletions src/app/(tools)/(domain)/dns/[domain]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,15 @@ export default async function DNSLookupResultPage({

return (
<TableRow key={record.name + record.value}>
<TableCell className="whitespace-nowrap">
{record.name}
<TableCell>
<Link
href={`https://${record.name}`}
className="hover:underline"
rel="nofollow noopener"
target="_blank"
>
{record.name}
</Link>
</TableCell>
<TableCell>
<Badge
Expand Down
19 changes: 8 additions & 11 deletions src/app/(tools)/(domain)/subdomain/[domain]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,14 @@ export default async function SubdomainFinderResultPage({
{result.map((record) => (
<TableRow key={record.subdomain}>
<TableCell>
<div className="flex items-center">
<Link
href={`https://${record.subdomain}`}
className="hover:underline"
rel="nofollow noopener"
target="_blank"
>
{record.subdomain}
</Link>
<CopyButton text={record.subdomain} />
</div>
<Link
href={`https://${record.subdomain}`}
className="hover:underline"
rel="nofollow noopener"
target="_blank"
>
{record.subdomain}
</Link>
</TableCell>
<TableCell>
<div className="flex items-center">
Expand Down
4 changes: 2 additions & 2 deletions src/app/(tools)/(domain)/whois/[domain]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ export default async function WhoisLookupResultPage({
<div className="flex w-fit items-center gap-2" key={i}>
<div className="h-5 w-5 shrink-0 rounded p-0.5 shadow ring-1 ring-muted-foreground/25">
<Image
src={`https://icons.duckduckgo.com/ip3/${nsDomain}.ico`}
className="select-none"
src={`https://favicon.victr.me/blob/https://${nsDomain}`}
className="aspect-square select-none"
draggable={false}
unoptimized
height={20}
Expand Down

0 comments on commit 24e05b3

Please sign in to comment.