refactor: Code review improvements.

Signed-off-by: Marley Powell <Marley.Powell@exclaimer.com>
This commit is contained in:
Marley Powell
2021-10-21 09:31:20 +01:00
parent e4eda2da9b
commit e823146635
3 changed files with 7 additions and 7 deletions
@@ -156,9 +156,9 @@ const columns: TableColumn[] = [
];
type BuildTableProps = {
items: RepoBuild[] | null;
items?: RepoBuild[];
loading: boolean;
error: Error | null;
error?: Error;
};
export const BuildTable = ({ items, loading, error }: BuildTableProps) => {
@@ -27,9 +27,9 @@ export function useRepoBuilds(
entity: Entity,
defaultLimit?: number,
): {
items: RepoBuild[] | null;
items?: RepoBuild[];
loading: boolean;
error: Error | null;
error?: Error;
} {
const top = defaultLimit ?? AZURE_DEVOPS_DEFAULT_TOP;
const options: RepoBuildOptions = {
@@ -44,8 +44,8 @@ export function useRepoBuilds(
}, [api, project, repo, entity]);
return {
items: value?.items ?? null,
items: value?.items,
loading,
error: error ?? null,
error,
};
}