Skip to content

Commit

Permalink
Merge pull request #724 from statisticsnorway/fix-id-parsing
Browse files Browse the repository at this point in the history
Fetch classification id directly from the json response.
  • Loading branch information
bjornandre authored May 13, 2024
2 parents 92c6c6b + d7d2a26 commit 3ee24e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/views/CodeList/SearchCodeLists.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useContext, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { AppContext } from 'controllers';
import { useKlassGet, URL } from 'controllers/klass-api';
import { useKlassGet } from 'controllers/klass-api';
import { CodeListFetcher } from 'views';
import { eu } from 'utils';
import { Search, Help, HelpButton, ListTable } from 'components';
Expand Down Expand Up @@ -44,7 +44,7 @@ export const SearchCodeLists = () => {
eu(versionValidUntil) || '...' }`
}/>

<ListTable items={ searchResult.map(s => ({ id: URL.info(s._links?.self?.href).id })) }
<ListTable items={ searchResult.map(s => ({ id: s.id })) }
placeholder={ t('Nothing is found') }
component={ CodeListFetcher }
/>
Expand Down

0 comments on commit 3ee24e7

Please sign in to comment.