mirror of
https://github.com/aljazceru/rabbit.git
synced 2025-12-17 05:54:19 +01:00
update
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { Component, createEffect, createSignal, Show } from 'solid-js';
|
||||
import { fixUrl } from '@/utils/imageUrl';
|
||||
import SafeLink from '../utils/SafeLink';
|
||||
|
||||
type ImageDisplayProps = {
|
||||
url: string;
|
||||
@@ -21,13 +22,13 @@ const ImageDisplay: Component<ImageDisplayProps> = (props) => {
|
||||
</button>
|
||||
}
|
||||
>
|
||||
<a class="my-2 block" href={props.url} target="_blank" rel="noopener noreferrer">
|
||||
<SafeLink class="my-2 block" href={props.url}>
|
||||
<img
|
||||
class="inline-block max-h-64 max-w-full rounded object-contain shadow hover:shadow-md"
|
||||
src={fixUrl(new URL(props.url)).toString()}
|
||||
src={fixUrl(props.url)}
|
||||
alt={props.url}
|
||||
/>
|
||||
</a>
|
||||
</SafeLink>
|
||||
</Show>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user