refactor: Code review improvements.
Signed-off-by: Marley Powell <Marley.Powell@exclaimer.com>
This commit is contained in:
@@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user