mirror of
https://github.com/arcan1s/ahriman.git
synced 2026-04-07 11:03:37 +00:00
refactor: reorder arguments in web ui
This commit is contained in:
@@ -22,10 +22,10 @@ import type { RepositoryId } from "models/RepositoryId";
|
||||
import { useState } from "react";
|
||||
|
||||
export interface SelectedRepositoryResult {
|
||||
selectedKey: string;
|
||||
setSelectedKey: (key: string) => void;
|
||||
selectedRepository: RepositoryId | null;
|
||||
reset: () => void;
|
||||
selectedKey: string;
|
||||
selectedRepository: RepositoryId | null;
|
||||
setSelectedKey: (key: string) => void;
|
||||
}
|
||||
|
||||
export function useSelectedRepository(): SelectedRepositoryResult {
|
||||
@@ -40,9 +40,9 @@ export function useSelectedRepository(): SelectedRepositoryResult {
|
||||
}
|
||||
}
|
||||
|
||||
const reset: () => void = () => {
|
||||
const reset = (): void => {
|
||||
setSelectedKey("");
|
||||
};
|
||||
|
||||
return { selectedKey, setSelectedKey, selectedRepository, reset };
|
||||
return { reset, selectedKey, selectedRepository, setSelectedKey };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user