Fix duplications of data, sort query list, visual improvements

This commit is contained in:
Guntis Smaukstelis
2023-05-21 13:26:17 +03:00
parent 040672d6e0
commit 8b3f97bb96
8 changed files with 15 additions and 21 deletions
+2 -2
View File
@@ -7,12 +7,12 @@ export const FileContent: Component<{getFileName: Accessor<string>}> = (props) =
if (fileName === "") return;
await new Promise(resolve => setTimeout(resolve, 500))
const response = await fetch(`${apiHost}/api/show/file/${fileName}`);
const text = await response.text();
const text = await response.json();
return text;
}
const [contentResource] = createResource(props.getFileName, fetchFileContent);
const lines = () => contentResource()?.split("<br/>") ?? ["empty..."];
const lines = () => contentResource();
return (
<div>