mirror of
https://github.com/aljazceru/mutiny-web.git
synced 2025-12-17 06:14:21 +01:00
use primal cdn for images
This commit is contained in:
@@ -465,6 +465,16 @@ function ContactButton(props: {
|
|||||||
onClick: () => void;
|
onClick: () => void;
|
||||||
}) {
|
}) {
|
||||||
const i18n = useI18n();
|
const i18n = useI18n();
|
||||||
|
|
||||||
|
const primalUrl = createMemo(() => {
|
||||||
|
const originalUrl = props.contact.image_url;
|
||||||
|
if (!originalUrl) return undefined;
|
||||||
|
|
||||||
|
return `https://primal.b-cdn.net/media-cache?s=s&a=1&u=${encodeURIComponent(
|
||||||
|
originalUrl
|
||||||
|
)}`;
|
||||||
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
onClick={() => props.onClick()}
|
onClick={() => props.onClick()}
|
||||||
@@ -480,7 +490,7 @@ function ContactButton(props: {
|
|||||||
>
|
>
|
||||||
<LabelCircle
|
<LabelCircle
|
||||||
name={props.contact.name}
|
name={props.contact.name}
|
||||||
image_url={props.contact.image_url}
|
image_url={primalUrl()}
|
||||||
contact
|
contact
|
||||||
label={false}
|
label={false}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user