refactor file feature
This commit is contained in:
parent
e8545fe093
commit
881608f7de
4 changed files with 179 additions and 177 deletions
|
@ -1,16 +1,16 @@
|
|||
import { useNavigate } from "@solidjs/router";
|
||||
import { createEffect } from "solid-js";
|
||||
import { useFiles } from "~/features/file";
|
||||
import { isServer } from "solid-js/web";
|
||||
import { useFiles } from "~/features/file/context";
|
||||
|
||||
export default function Index() {
|
||||
const navigate = useNavigate();
|
||||
const files = useFiles();
|
||||
|
||||
createEffect(() => {
|
||||
const loading = files.loading();
|
||||
const root = files.root();
|
||||
|
||||
if (loading) {
|
||||
if (isServer) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue