diff --git a/frontend/app/view/preview.tsx b/frontend/app/view/preview.tsx
index e4439be8d..f142bc773 100644
--- a/frontend/app/view/preview.tsx
+++ b/frontend/app/view/preview.tsx
@@ -108,6 +108,19 @@ function StreamingPreview({ fileInfo }: { fileInfo: FileInfo }) {
return Preview Not Supported;
}
+function CodeEditPreview({
+ contentAtom,
+ filename,
+ readonly,
+}: {
+ contentAtom: jotai.Atom>;
+ filename: string;
+ readonly: boolean;
+}) {
+ const fileContent = jotai.useAtomValue(contentAtom);
+ return ;
+}
+
function PreviewView({ blockId }: { blockId: string }) {
const blockAtom = WOS.getWaveObjectAtom(`block:${blockId}`);
const fileNameAtom: jotai.WritableAtom = useBlockCache(blockId, "preview:filename", () =>
@@ -161,7 +174,6 @@ function PreviewView({ blockId }: { blockId: string }) {
}
let fileName = jotai.useAtomValue(fileNameAtom);
const fileInfo = jotai.useAtomValue(statFileAtom);
- const fileContent = jotai.useAtomValue(fileContentAtom);
// handle streaming files here
let specializedView: React.ReactNode;
@@ -197,7 +209,7 @@ function PreviewView({ blockId }: { blockId: string }) {
(mimeType.includes("json") || mimeType.includes("yaml") || mimeType.includes("toml")))
) {
blockIcon = "file-code";
- specializedView = specializedView = ;
+ specializedView = ;
} else if (mimeType === "directory") {
blockIcon = "folder";
if (fileName == "~" || fileName == "~/") {