1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56: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

@ -3,7 +3,7 @@ import React, { FC, Fragment } from 'react';
import classNames from 'classnames';
import { FlowCell } from '~/components/flow/FlowCell';
import { PRESETS, URLS } from '~/constants/urls';
import { flowDisplayToPreset, ImagePresets, URLS } from '~/constants/urls';
import { FlowDisplay, IFlowNode, INode } from '~/types';
import { IUser } from '~/types/auth';
import { getURLFromString } from '~/utils/dom';
@ -30,7 +30,7 @@ export const FlowGrid: FC<Props> = ({ user, nodes, onChangeCellView }) => {
id={node.id}
color={node.flow.dominant_color}
to={URLS.NODE_URL(node.id)}
image={getURLFromString(node.thumbnail, PRESETS.cover)}
image={getURLFromString(node.thumbnail, flowDisplayToPreset[node.flow.display])}
flow={node.flow}
text={node.description}
title={node.title}