fix: overload

This commit is contained in:
2024-10-31 10:25:00 +07:00
parent 9b02ab5842
commit 043cabfd4e
4 changed files with 105 additions and 39 deletions

View File

@@ -32,10 +32,15 @@ export function Images({ urls }: { urls: string[] }) {
return `https://wsrv.nl?url=${url}&ll&af&default=1&n=-1`;
});
} else {
newUrls = urls.map(
(url) =>
`https://wsrv.nl?url=${url}&w=480&h=640&ll&af&default=1&n=-1`,
);
newUrls = urls.map((url) => {
if (url.includes("_next/")) {
return url;
}
if (url.includes("bsky.network")) {
return url;
}
return `https://wsrv.nl?url=${url}&ll&af&default=1&n=-1`;
});
}
return newUrls;