Rename to blocks (#502)

This commit is contained in:
Jeremy 2024-11-07 02:40:29 +03:00 committed by GitHub
parent 22a09de6e6
commit 729634e1d6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 108 additions and 111 deletions

View file

@ -1,6 +1,6 @@
import { SetStateAction } from 'react';
import { UICanvas } from './canvas';
import { UIBlock } from './block';
import { FileIcon, LoaderIcon, MessageIcon, PencilEditIcon } from './icons';
const getActionText = (type: 'create' | 'update' | 'request-suggestions') => {
@ -19,15 +19,15 @@ const getActionText = (type: 'create' | 'update' | 'request-suggestions') => {
interface DocumentToolResultProps {
type: 'create' | 'update' | 'request-suggestions';
result: any;
canvas: UICanvas;
setCanvas: (value: SetStateAction<UICanvas>) => void;
block: UIBlock;
setBlock: (value: SetStateAction<UIBlock>) => void;
}
export function DocumentToolResult({
type,
result,
canvas,
setCanvas,
block,
setBlock,
}: DocumentToolResultProps) {
return (
<div
@ -42,7 +42,7 @@ export function DocumentToolResult({
height: rect.height,
};
setCanvas({
setBlock({
documentId: result.id,
content: '',
title: result.title,