wip: onboarding

This commit is contained in:
2024-03-25 14:22:06 +07:00
parent a49b88ab35
commit 6e489f1c49
22 changed files with 299 additions and 422 deletions

View File

@@ -7,7 +7,6 @@ import { UnlistenFn } from "@tauri-apps/api/event";
import { getCurrent } from "@tauri-apps/api/window";
import { useEffect, useRef, useState } from "react";
import { VList, VListHandle } from "virtua";
import { useHotkeys } from "react-hotkeys-hook";
export const Route = createFileRoute("/$account/home")({
component: Screen,
@@ -27,9 +26,6 @@ function Screen() {
const [selectedIndex, setSelectedIndex] = useState(-1);
const [isScroll, setIsScroll] = useState(false);
useHotkeys("left", () => goLeft());
useHotkeys("right", () => goRight());
const goLeft = () => {
const prevIndex = Math.max(selectedIndex - 1, 0);
setSelectedIndex(prevIndex);