{table.getRowModel().rows.map((row) => (
@@ -98,18 +100,21 @@ function TableBody({ table, setFileName }: TableBodyProps) {
tabIndex={0}
onDoubleClick={() => {
const newFileName = row.getValue("path") as string;
- setFileName(newFileName);
+ const fullPath = cwd.concat("/", newFileName);
+ setFileName(fullPath);
}}
>
- {row.getVisibleCells().map((cell) => (
-
- ))}
+ {row.getVisibleCells().map((cell) => {
+ return (
+
+ {cell.renderValue()}
+
+ );
+ })}
))}
@@ -130,7 +135,7 @@ function DirectoryPreview({ contentAtom, fileNameAtom }: DirectoryPreviewProps)
const contentText = jotai.useAtomValue(contentAtom);
let content: FileInfo[] = JSON.parse(contentText);
let [fileName, setFileName] = jotai.useAtom(fileNameAtom);
- return