1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-05-01 23:56:41 +07:00

creating youtube node

This commit is contained in:
Fedor Katurov 2019-10-19 19:53:53 +07:00
parent 8612cc5ce7
commit f7c2f0e90f
6 changed files with 22 additions and 6 deletions
src/components/editors/EditorPanel

View file

@ -2,6 +2,7 @@ import React, { FC } from 'react';
import * as styles from './styles.scss';
import { INode } from '~/redux/types';
import { EditorUploadButton } from '~/components/editors/EditorUploadButton';
import { NODE_UPLOAD_TYPES } from '~/redux/node/constants';
interface IProps {
data: INode;
@ -12,7 +13,9 @@ interface IProps {
const EditorPanel: FC<IProps> = ({ data, setData, temp, setTemp }) => (
<div className={styles.panel}>
<EditorUploadButton data={data} setData={setData} temp={temp} setTemp={setTemp} />
{data.type && NODE_UPLOAD_TYPES[data.type] && (
<EditorUploadButton data={data} setData={setData} temp={temp} setTemp={setTemp} />
)}
</div>
);