mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 12:54:20 +01:00
chore(lint): replace ESLint with Oxlint and clear anti-slop findings
This commit is contained in:
1 parent
c6c13335e5
commit
b625acfc0c
1083 files changed
+67089
-80136
No files matched your search
@@ -19,7 +19,7 @@ export function useSidebarRepoGroups(input: {
|
||||
repos: Repo[]
|
||||
search?: string
|
||||
worktrees?: ReadonlyArray<ActiveWorktree>
|
||||
}): { groups: SidebarRepoGroup[]; isLoading: boolean; isError: boolean; hasMore: boolean } {
|
||||
}): SidebarRepoGroupsResult {
|
||||
const { repos, search, worktrees } = input
|
||||
|
||||
const directories = useMemo(
|
||||
@@ -74,7 +74,20 @@ export function useSidebarRepoGroups(input: {
|
||||
return { groups, isLoading, isError, hasMore: Boolean(hasNextPage) }
|
||||
}
|
||||
|
||||
export function useNavigableRepos(enabled = true): { repos: Repo[]; isLoading: boolean; refetch: () => void } {
|
||||
interface SidebarRepoGroupsResult {
|
||||
groups: SidebarRepoGroup[]
|
||||
isLoading: boolean
|
||||
isError: boolean
|
||||
hasMore: boolean
|
||||
}
|
||||
|
||||
interface NavigableReposResult {
|
||||
repos: Repo[]
|
||||
isLoading: boolean
|
||||
refetch: () => void
|
||||
}
|
||||
|
||||
export function useNavigableRepos(enabled = true): NavigableReposResult {
|
||||
const { data, isLoading, refetch } = useQuery({ queryKey: ['repos'], queryFn: listRepos, enabled })
|
||||
const repos = useMemo(() => selectNavigableRepos(data ?? []), [data])
|
||||
return { repos, isLoading, refetch: () => { void refetch() } }
|
||||
|
||||
Reference in new issue
Block a user