small improvements

This commit is contained in:
Daniel 2023-03-29 06:15:25 +03:30
parent 5328be208b
commit 94be799586
3 changed files with 8 additions and 7 deletions

View File

@ -28,7 +28,7 @@ export default function ({
const { removeLink } = useLinkStore();
const shortendURL = new URL(link.url).host.toLowerCase();
const url = new URL(link.url);
const formattedDate = new Date(link.createdAt).toLocaleString("en-US", {
year: "numeric",
month: "short",
@ -48,7 +48,7 @@ export default function ({
) : null}
<Image
src={`http://icons.duckduckgo.com/ip3/${shortendURL}.ico`}
src={`https://t2.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=${url.origin}&size=32`}
width={32}
height={32}
alt=""
@ -60,7 +60,7 @@ export default function ({
}}
/>
<Image
src={`http://icons.duckduckgo.com/ip3/${shortendURL}.ico`}
src={`https://t2.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=${url.origin}&size=32`}
width={80}
height={80}
alt=""
@ -98,7 +98,7 @@ export default function ({
<p className="text-gray-500">{formattedDate}</p>
<a href={link.url} target="_blank" className="group/url">
<div className="text-gray-500 font-bold flex items-center gap-1">
<p>{shortendURL}</p>
<p>{url.host}</p>
<FontAwesomeIcon
icon={faArrowUpRightFromSquare}
className="w-3 opacity-0 group-hover/url:opacity-100 duration-75"

View File

@ -43,8 +43,9 @@ export default function EditLink({ toggleLinkModal, link }: Props) {
return (
<div className="flex flex-col gap-3">
<p className="font-bold text-sky-300 mb-2 text-center">Edit Link</p>
<p>{shortendURL}</p>
<p>{link.title}</p>
<p className="text-sky-700">
{shortendURL} | {link.title}
</p>
<div className="flex gap-5 items-center justify-between">
<p className="text-sm font-bold text-sky-300">Name</p>
<input

View File

@ -2,7 +2,7 @@
const nextConfig = {
reactStrictMode: true,
images: {
domains: ["icons.duckduckgo.com"],
domains: ["t2.gstatic.com"],
},
};