Skip to content

Commit

Permalink
chore: add genre to types
Browse files Browse the repository at this point in the history
  • Loading branch information
candicecz committed May 31, 2024
1 parent 4d4bbb7 commit c91c5eb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/hooks/api/useResourceCatalogs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export function useResourceCatalogs({
conditionsOfAccess: catalog.conditionsOfAccess,
type: catalog['@type'],
name: catalog.name,
domain: catalog.genre.toLowerCase() as ResourceCatalog['domain'],
domain: catalog?.genre ? catalog.genre.toLowerCase() : 'other',
url: catalog.url,
}));
},
Expand Down
1 change: 1 addition & 0 deletions src/utils/api/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ export interface FormattedResource {
doi: string | null;
downloadUrl: { name: string }[] | null;
funding: Funding[] | null;
genre: string | null;
hasAPI: boolean | null;
hasDownload:
| 'All content'
Expand Down

0 comments on commit c91c5eb

Please sign in to comment.