mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-24 20:36:40 +07:00
added lazy loading to NodeImageSwiperBlock
This commit is contained in:
parent
991f829216
commit
10bb6f01b5
17 changed files with 210 additions and 106 deletions
|
@ -3,7 +3,7 @@ import React, { forwardRef } from 'react';
|
|||
import classNames from 'classnames';
|
||||
|
||||
import { Square } from '~/components/common/Square';
|
||||
import { ImagePresets } from '~/constants/urls';
|
||||
import { imagePresets } from '~/constants/urls';
|
||||
import { useColorGradientFromString } from '~/hooks/color/useColorGradientFromString';
|
||||
import { getURLFromString } from '~/utils/dom';
|
||||
import { DivProps } from '~/utils/types';
|
||||
|
@ -14,12 +14,12 @@ interface Props extends DivProps {
|
|||
url?: string;
|
||||
username?: string;
|
||||
size?: number;
|
||||
preset?: typeof ImagePresets[keyof typeof ImagePresets];
|
||||
preset?: typeof imagePresets[keyof typeof imagePresets];
|
||||
}
|
||||
|
||||
const Avatar = forwardRef<HTMLDivElement, Props>(
|
||||
(
|
||||
{ url, username, size, className, preset = ImagePresets.avatar, ...rest },
|
||||
{ url, username, size, className, preset = imagePresets.avatar, ...rest },
|
||||
ref,
|
||||
) => {
|
||||
return (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue