diff --git a/assets/js/collaborative-editor/components/manual-run/SelectedDataclipView.tsx b/assets/js/collaborative-editor/components/manual-run/SelectedDataclipView.tsx index fae35ed6b6..24844a6ca3 100644 --- a/assets/js/collaborative-editor/components/manual-run/SelectedDataclipView.tsx +++ b/assets/js/collaborative-editor/components/manual-run/SelectedDataclipView.tsx @@ -1,12 +1,12 @@ -import { CheckIcon, PencilIcon, XMarkIcon } from "@heroicons/react/24/outline"; -import { useCallback, useState } from "react"; +import { CheckIcon, PencilIcon, XMarkIcon } from '@heroicons/react/24/outline'; +import { useCallback, useState } from 'react'; -import { cn } from "#/utils/cn"; +import { cn } from '#/utils/cn'; -import { DataclipViewer } from "../../../react/components/DataclipViewer"; -import type { Dataclip } from "../../api/dataclips"; -import { RENDER_MODES, type RenderMode } from "../../constants/panel"; -import { Button } from "../Button"; +import { DataclipViewer } from '../../../react/components/DataclipViewer'; +import type { Dataclip } from '../../api/dataclips'; +import { RENDER_MODES, type RenderMode } from '../../constants/panel'; +import { Button } from '../Button'; interface SelectedDataclipViewProps { dataclip: Dataclip; @@ -26,13 +26,13 @@ export function SelectedDataclipView({ renderMode = RENDER_MODES.STANDALONE, }: SelectedDataclipViewProps) { const [isEditingName, setIsEditingName] = useState(false); - const [editedName, setEditedName] = useState(dataclip.name || ""); + const [editedName, setEditedName] = useState(dataclip.name || ''); const [isSaving, setIsSaving] = useState(false); const [error, setError] = useState(null); const handleCancelEdit = useCallback(() => { setIsEditingName(false); - setEditedName(dataclip.name || ""); + setEditedName(dataclip.name || ''); setError(null); }, [dataclip.name]); @@ -51,7 +51,7 @@ export function SelectedDataclipView({ await onNameChange(dataclip.id, newName); setIsEditingName(false); } catch (err) { - setError(err instanceof Error ? err.message : "Failed to save name"); + setError(err instanceof Error ? err.message : 'Failed to save name'); } finally { setIsSaving(false); } @@ -62,8 +62,8 @@ export function SelectedDataclipView({ {/* Header */}
@@ -74,10 +74,10 @@ export function SelectedDataclipView({ value={editedName} onChange={e => setEditedName(e.target.value)} onKeyDown={e => { - if (e.key === "Enter" && !isSaving) { + if (e.key === 'Enter' && !isSaving) { e.preventDefault(); void handleSaveName(); - } else if (e.key === "Escape") { + } else if (e.key === 'Escape') { e.preventDefault(); handleCancelEdit(); } @@ -109,7 +109,7 @@ export function SelectedDataclipView({ <>

- {dataclip.name || "Unnamed"} + {dataclip.name || 'Unnamed'}

{canEdit && (