import { type Component, For, createMemo } from "solid-js"; import { store, getCombinedScore, matchesFilter } from "@/store"; import { TaskCard } from "@/components/TaskCard"; import { useDelayedSort } from "@/hooks/useDelayedSort"; import { useTaskListAutoAnimate } from "@/hooks/useTaskListAutoAnimate"; export const PriorityView: Component = () => { const sourceTasks = createMemo(() => store.tasks.filter(t => !t.deletedAt && matchesFilter(t))); const { displayedTasks, shakingTaskIds } = useDelayedSort( sourceTasks, (a, b) => { if (a.completed !== b.completed) return a.completed ? 1 : -1; return getCombinedScore(b) - getCombinedScore(a); }, 300 ); let listRef: HTMLDivElement | undefined; useTaskListAutoAnimate(() => listRef); return (
Your tasks ordered by priority.
Focus sharp. No high-priority tasks yet.