diff --git a/src/components/sections/KeysDataSection.tsx b/src/components/sections/KeysDataSection.tsx index 4e4df8d..21044db 100644 --- a/src/components/sections/KeysDataSection.tsx +++ b/src/components/sections/KeysDataSection.tsx @@ -4,6 +4,7 @@ import React, { useEffect, useState } from 'react' import { useNavigate, useParams } from 'react-router-dom' import classes from '../../App.module.css' import useCustomAlert from '../../hooks/useCustomAlert' +import useSearchFilter from '../../hooks/useSearchFilter' import i18n from '../../locales' import ErrorNotice from '../error/ErrorNotice' import PanelHeader from '../header/PanelHeader' @@ -39,6 +40,10 @@ const KeysDataSection = ({ query }) => { } ) + const { searchTerm, setSearchTerm, filteredData } = useSearchFilter( + data?.results + ) + const numberOfKeysInNamespace = data?.results?.length const handleCreate = async ({ key }) => { @@ -144,12 +149,16 @@ const KeysDataSection = ({ query }) => { />