feat: update default column informations

This commit is contained in:
2024-03-21 14:53:08 +07:00
parent cb565ff35b
commit dd7155a3a6
19 changed files with 90 additions and 44 deletions

View File

@@ -1,6 +1,6 @@
import { Col } from "@/components/col";
import { Toolbar } from "@/components/toolbar";
import { LoaderIcon } from "@lume/icons";
import { LoaderIcon, PlusIcon } from "@lume/icons";
import { EventColumns, LumeColumn } from "@lume/types";
import { createFileRoute } from "@tanstack/react-router";
import { UnlistenFn } from "@tauri-apps/api/event";
@@ -13,9 +13,8 @@ export const Route = createFileRoute("/$account/home")({
pendingComponent: Pending,
});
const COLS: LumeColumn[] = [
const DEFAULT_COLUMNS: LumeColumn[] = [
{ id: 1, name: "Newsfeed", content: "/newsfeed" },
{ id: 9999, name: "Lume Store", content: "/store/official" },
];
function Screen() {
@@ -23,7 +22,7 @@ function Screen() {
const vlistRef = useRef<VListHandle>(null);
const unlisten = useRef<UnlistenFn>(null);
const [columns, setColumns] = useState(COLS);
const [columns, setColumns] = useState(DEFAULT_COLUMNS);
const [selectedIndex, setSelectedIndex] = useState(-1);
const [isScroll, setIsScroll] = useState(false);