???
This commit is contained in:
parent
1d48ab8256
commit
c45d8f1e64
1 changed files with 3 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
import { $, component$, useOnDocument } from "@builder.io/qwik";
|
||||
import { component$, useVisibleTask$ } from "@builder.io/qwik";
|
||||
import { routeLoader$, type DocumentHead } from "@builder.io/qwik-city";
|
||||
import Controlbar from "~/components/Controlbar";
|
||||
import File from "~/components/File";
|
||||
|
@ -19,12 +19,12 @@ export default component$(() => {
|
|||
const files = useNanostore$<StereoFile[]>(dashboardFiles);
|
||||
const loaded = useNanostore$<boolean>(areFilesLoaded);
|
||||
|
||||
useOnDocument("DOMContentLoaded", $(async () => {
|
||||
useVisibleTask$(async () => {
|
||||
loaded.value = false;
|
||||
files.value = await api.list();
|
||||
console.log("Files loaded:", files.value);
|
||||
loaded.value = true;
|
||||
}));
|
||||
});
|
||||
|
||||
return (
|
||||
<>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue