Skip to content

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

360 B
Raw Blame
import { JSONContent } from '@tiptap/core';

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

interface FileRendererProps {
  node: JSONContent;
  keyPrefix: string | null;
}

export const FileRenderer = ({ node }: FileRendererProps) => {
  const id = node.attrs?.id;
  if (!id) {
    return null;
  }

  return <FileBlock id={id} />;
};