feat: refactor whole bunch of stuff
This commit is contained in:
@@ -6,13 +6,16 @@ declare global {
|
||||
}
|
||||
|
||||
export function Link(
|
||||
{ href, children, class: _class, style }: {
|
||||
props: {
|
||||
href?: string;
|
||||
class?: string;
|
||||
style?: preact.JSX.CSSProperties;
|
||||
children: preact.ComponentChildren;
|
||||
"data-thumb"?: string;
|
||||
},
|
||||
) {
|
||||
const { href, children, class: _class, style } = props;
|
||||
const thumbhash = props["data-thumb"];
|
||||
function handleClick() {
|
||||
if (globalThis.loadingTimeout) {
|
||||
return;
|
||||
@@ -41,6 +44,7 @@ export function Link(
|
||||
href={href}
|
||||
style={style}
|
||||
onClick={handleClick}
|
||||
data-thumb={thumbhash}
|
||||
class={_class}
|
||||
>
|
||||
{children}
|
||||
|
||||
Reference in New Issue
Block a user