Skip to content

Commit e36c50b

Browse files
taylordowns2000doc-han
authored andcommitted
run formatter
1 parent 999e179 commit e36c50b

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

assets/js/react/components/DataclipViewer.tsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
import { useEffect, useState } from "react";
1+
import { useEffect, useState } from 'react';
22

3-
import { MonacoEditor } from "#/monaco";
3+
import { MonacoEditor } from '#/monaco';
44

55
async function fetchDataclipContent(dataclipId: string) {
66
try {
77
const response = await fetch(`/dataclip/body/${dataclipId}`);
88
if (!response.ok && response.status !== 304) {
9-
throw new Error("Network response was not ok");
9+
throw new Error('Network response was not ok');
1010
}
1111

1212
return await response.text();
1313
} catch (error) {
14-
console.error("Error fetching content:", error);
15-
return "Failed to load content";
14+
console.error('Error fetching content:', error);
15+
return 'Failed to load content';
1616
}
1717
}
1818

1919
export const DataclipViewer = ({ dataclipId }: { dataclipId: string }) => {
20-
const [content, setContent] = useState<string>("");
20+
const [content, setContent] = useState<string>('');
2121
const [copied, setCopied] = useState(false);
2222

2323
useEffect(() => {
@@ -53,19 +53,19 @@ export const DataclipViewer = ({ dataclipId }: { dataclipId: string }) => {
5353
return;
5454
})
5555
.catch((error: unknown) => {
56-
console.error("Failed to copy:", error);
56+
console.error('Failed to copy:', error);
5757
});
5858
}
5959
};
6060

6161
return (
6262
<div className="h-full relative">
63-
{content && content !== "Failed to load content" && (
63+
{content && content !== 'Failed to load content' && (
6464
<button
6565
onClick={handleCopy}
6666
className="absolute top-3 right-3 z-10 p-1.5 rounded text-gray-400 hover:text-gray-600 hover:bg-gray-100/80 focus:outline-none transition-colors"
67-
title={copied ? "Copied!" : "Copy to clipboard"}
68-
aria-label={copied ? "Copied to clipboard" : "Copy to clipboard"}
67+
title={copied ? 'Copied!' : 'Copy to clipboard'}
68+
aria-label={copied ? 'Copied to clipboard' : 'Copy to clipboard'}
6969
>
7070
{copied ? (
7171
<svg
@@ -110,13 +110,13 @@ export const DataclipViewer = ({ dataclipId }: { dataclipId: string }) => {
110110
scrollBeyondLastLine: false,
111111
overviewRulerLanes: 0,
112112
overviewRulerBorder: false,
113-
fontFamily: "Fira Code VF",
113+
fontFamily: 'Fira Code VF',
114114
fontSize: 14,
115115
fontLigatures: true,
116116
minimap: {
117117
enabled: false,
118118
},
119-
wordWrap: "on",
119+
wordWrap: 'on',
120120
}}
121121
/>
122122
</div>

0 commit comments

Comments
 (0)