Skip to content

Commit 36e9783

Browse files
chore: rafactored TaxaList model to inherit from the Entity
1 parent 5695c3c commit 36e9783

File tree

5 files changed

+5
-118
lines changed

5 files changed

+5
-118
lines changed

ui/src/data-services/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const API_ROUTES = {
2121
SESSIONS: 'events',
2222
SITES: 'deployments/sites',
2323
SPECIES: 'taxa',
24-
TAXALISTS: 'taxa/lists',
24+
TAXA_LISTS: 'taxa/lists',
2525
STORAGE: 'storage',
2626
SUMMARY: 'status/summary',
2727
USERS: 'users',

ui/src/data-services/hooks/taxa-lists/useTaxaLists.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { API_ROUTES } from 'data-services/constants'
2-
import { ServerTaxaList, TaxaList } from 'data-services/models/taxalist'
2+
import { ServerTaxaList, TaxaList } from 'data-services/models/taxa-list'
33
import { FetchParams } from 'data-services/types'
44
import { getFetchUrl } from 'data-services/utils'
55
import { useMemo } from 'react'
@@ -20,7 +20,7 @@ export const useTaxaLists = (
2020
} => {
2121
// Construct API fetch URL with query parameters
2222
const fetchUrl = getFetchUrl({
23-
collection: API_ROUTES.TAXALISTS,
23+
collection: API_ROUTES.TAXA_LISTS,
2424
params,
2525
})
2626

@@ -29,7 +29,7 @@ export const useTaxaLists = (
2929
results: ServerTaxaList[]
3030
user_permissions?: UserPermission[]
3131
}>({
32-
queryKey: [API_ROUTES.TAXALISTS, params],
32+
queryKey: [API_ROUTES.TAXA_LISTS, params],
3333
url: fetchUrl,
3434
})
3535

ui/src/data-services/hooks/taxalists/useTaxalists.ts

Lines changed: 0 additions & 49 deletions
This file was deleted.

ui/src/data-services/models/taxalist.ts

Lines changed: 0 additions & 64 deletions
This file was deleted.

ui/src/utils/useFilters.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export const AVAILABLE_FILTERS: {
8888
field: 'taxon',
8989
},
9090
{
91-
label: 'Taxa List',
91+
label: 'Taxa list',
9292
field: 'taxa_list_id',
9393
},
9494
{

0 commit comments

Comments
 (0)