1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 04:46:40 +07:00

added new flow presets

This commit is contained in:
Fedor Katurov 2022-03-15 12:09:00 +07:00
parent 4e5a6d727a
commit 5cd1064140
18 changed files with 64 additions and 45 deletions

View file

@ -4,7 +4,7 @@ import classNames from 'classnames';
import { ImageWithSSRLoad } from '~/components/common/ImageWithSSRLoad';
import { Square } from '~/components/common/Square';
import { PRESETS } from '~/constants/urls';
import { ImagePresets } from '~/constants/urls';
import { useColorGradientFromString } from '~/hooks/color/useColorGradientFromString';
import { useGotoNode } from '~/hooks/node/useGotoNode';
import { INode } from '~/types';
@ -39,7 +39,7 @@ const NodeRelatedItem: FC<IProps> = memo(({ item }) => {
const ref = useRef<HTMLDivElement>(null);
const thumb = useMemo(
() => (item.thumbnail ? getURL({ url: item.thumbnail }, PRESETS.avatar) : ''),
() => (item.thumbnail ? getURL({ url: item.thumbnail }, ImagePresets.avatar) : ''),
[item]
);
@ -63,7 +63,9 @@ const NodeRelatedItem: FC<IProps> = memo(({ item }) => {
return 'small';
}, [width]);
const image = useMemo(() => getURL({ url: item.thumbnail }, PRESETS.avatar), [item.thumbnail]);
const image = useMemo(() => getURL({ url: item.thumbnail }, ImagePresets.avatar), [
item.thumbnail,
]);
return (
<div