small improvements
This commit is contained in:
parent
5328be208b
commit
94be799586
|
@ -28,7 +28,7 @@ export default function ({
|
||||||
|
|
||||||
const { removeLink } = useLinkStore();
|
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", {
|
const formattedDate = new Date(link.createdAt).toLocaleString("en-US", {
|
||||||
year: "numeric",
|
year: "numeric",
|
||||||
month: "short",
|
month: "short",
|
||||||
|
@ -48,7 +48,7 @@ export default function ({
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
<Image
|
<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}
|
width={32}
|
||||||
height={32}
|
height={32}
|
||||||
alt=""
|
alt=""
|
||||||
|
@ -60,7 +60,7 @@ export default function ({
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Image
|
<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}
|
width={80}
|
||||||
height={80}
|
height={80}
|
||||||
alt=""
|
alt=""
|
||||||
|
@ -98,7 +98,7 @@ export default function ({
|
||||||
<p className="text-gray-500">{formattedDate}</p>
|
<p className="text-gray-500">{formattedDate}</p>
|
||||||
<a href={link.url} target="_blank" className="group/url">
|
<a href={link.url} target="_blank" className="group/url">
|
||||||
<div className="text-gray-500 font-bold flex items-center gap-1">
|
<div className="text-gray-500 font-bold flex items-center gap-1">
|
||||||
<p>{shortendURL}</p>
|
<p>{url.host}</p>
|
||||||
<FontAwesomeIcon
|
<FontAwesomeIcon
|
||||||
icon={faArrowUpRightFromSquare}
|
icon={faArrowUpRightFromSquare}
|
||||||
className="w-3 opacity-0 group-hover/url:opacity-100 duration-75"
|
className="w-3 opacity-0 group-hover/url:opacity-100 duration-75"
|
||||||
|
|
|
@ -43,8 +43,9 @@ export default function EditLink({ toggleLinkModal, link }: Props) {
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col gap-3">
|
<div className="flex flex-col gap-3">
|
||||||
<p className="font-bold text-sky-300 mb-2 text-center">Edit Link</p>
|
<p className="font-bold text-sky-300 mb-2 text-center">Edit Link</p>
|
||||||
<p>{shortendURL}</p>
|
<p className="text-sky-700">
|
||||||
<p>{link.title}</p>
|
{shortendURL} | {link.title}
|
||||||
|
</p>
|
||||||
<div className="flex gap-5 items-center justify-between">
|
<div className="flex gap-5 items-center justify-between">
|
||||||
<p className="text-sm font-bold text-sky-300">Name</p>
|
<p className="text-sm font-bold text-sky-300">Name</p>
|
||||||
<input
|
<input
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
const nextConfig = {
|
const nextConfig = {
|
||||||
reactStrictMode: true,
|
reactStrictMode: true,
|
||||||
images: {
|
images: {
|
||||||
domains: ["icons.duckduckgo.com"],
|
domains: ["t2.gstatic.com"],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Ŝarĝante…
Reference in New Issue