1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-28 14:16:41 +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

@ -2,7 +2,7 @@ import React, { ChangeEvent, FC, useCallback, useEffect } from 'react';
import { Icon } from '~/components/input/Icon';
import { UploadSubject, UploadTarget, UploadType } from '~/constants/uploads';
import { PRESETS } from '~/constants/urls';
import { ImagePresets } from '~/constants/urls';
import { useUploader } from '~/hooks/data/useUploader';
import { useNodeFormContext } from '~/hooks/node/useNodeFormFormik';
import { IEditorComponentProps } from '~/types/node';
@ -21,7 +21,7 @@ const EditorUploadCoverButton: FC<IProps> = () => {
values.cover ? [values.cover] : []
);
const background = values.cover ? getURL(values.cover, PRESETS['300']) : null;
const background = values.cover ? getURL(values.cover, ImagePresets['300']) : null;
const preview = pendingImages?.[0]?.thumbnail || '';
const onDropCover = useCallback(() => {