Skip to content

Open-source and local-first Slack and Notion alternative that puts you in control of your data

386 B
Raw Blame
import { type NodeViewProps } from '@tiptap/core';
import { NodeViewWrapper } from '@tiptap/react';

import { FileBlock } from '@colanode/ui/components/files/file-block';

export const FileNodeView = ({ node }: NodeViewProps) => {
  const id = node.attrs.id;
  if (!id) {
    return null;
  }

  return (
    <NodeViewWrapper>
      <FileBlock id={id} />
    </NodeViewWrapper>
  );
};