From d7d2a26430b80dbbec7fb725085db2f5fedbc3b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Skaar=2C=20Bj=C3=B8rn-Andre?= Date: Mon, 13 May 2024 13:15:43 +0200 Subject: [PATCH] Fetch classification id directly from the json response. --- src/views/CodeList/SearchCodeLists.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/CodeList/SearchCodeLists.jsx b/src/views/CodeList/SearchCodeLists.jsx index 64202e5a..88318360 100644 --- a/src/views/CodeList/SearchCodeLists.jsx +++ b/src/views/CodeList/SearchCodeLists.jsx @@ -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'; @@ -44,7 +44,7 @@ export const SearchCodeLists = () => { eu(versionValidUntil) || '...' }` }/> - ({ id: URL.info(s._links?.self?.href).id })) } + ({ id: s.id })) } placeholder={ t('Nothing is found') } component={ CodeListFetcher } />