diff --git a/src/pages/home/folder/List.tsx b/src/pages/home/folder/List.tsx index 58cfdfc2f..3d05e7c23 100644 --- a/src/pages/home/folder/List.tsx +++ b/src/pages/home/folder/List.tsx @@ -1,6 +1,6 @@ -import { HStack, VStack, Text, Checkbox } from "@hope-ui/solid"; -import { batch, createEffect, createSignal, For, Show } from "solid-js"; -import { useT } from "~/hooks"; +import { HStack, VStack, Text, Checkbox } from "@hope-ui/solid" +import { batch, createEffect, createSignal, For, Show } from "solid-js" +import { useT } from "~/hooks" import { allChecked, checkboxOpen, @@ -8,19 +8,19 @@ import { objStore, selectAll, sortObjs, -} from "~/store"; -import { OrderBy } from "~/store"; -import { Col, cols, ListItem } from "./ListItem"; +} from "~/store" +import { OrderBy } from "~/store" +import { Col, cols, ListItem } from "./ListItem" const ListLayout = () => { - const t = useT(); - const [orderBy, setOrderBy] = createSignal(); - const [reverse, setReverse] = createSignal(false); + const t = useT() + const [orderBy, setOrderBy] = createSignal() + const [reverse, setReverse] = createSignal(false) createEffect(() => { if (orderBy()) { - sortObjs(orderBy()!, reverse()); + sortObjs(orderBy()!, reverse()) } - }); + }) const itemProps = (col: Col) => { return { fontWeight: "bold", @@ -30,16 +30,16 @@ const ListLayout = () => { cursor: "pointer", onClick: () => { if (col.name === orderBy()) { - setReverse(!reverse()); + setReverse(!reverse()) } else { batch(() => { - setOrderBy(col.name as OrderBy); - setReverse(false); - }); + setOrderBy(col.name as OrderBy) + setReverse(false) + }) } }, - }; - }; + } + } return ( @@ -49,7 +49,7 @@ const ListLayout = () => { checked={allChecked()} indeterminate={isIndeterminate()} onChange={(e: any) => { - selectAll(e.target.checked as boolean); + selectAll(e.target.checked as boolean) }} /> @@ -60,7 +60,7 @@ const ListLayout = () => { {t(`home.obj.${cols[2].name}`)} @@ -68,11 +68,11 @@ const ListLayout = () => { {(obj, i) => { - return ; + return }} - ); -}; + ) +} -export default ListLayout; +export default ListLayout