Skip to content

Commit

Permalink
Remove unnecessary memoisation
Browse files Browse the repository at this point in the history
  • Loading branch information
denniskigen committed Jan 31, 2024
1 parent 0878afc commit 31cc083
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useCallback, useMemo, useRef, useState, useEffect } from 'react';
import React, { useCallback, useRef, useState, useEffect } from 'react';
import { navigate, interpolateString, useConfig, useSession, useDebounce } from '@openmrs/esm-framework';
import useArrowNavigation from '../hooks/useArrowNavigation';
import type { SearchedPatient } from '../types';
Expand All @@ -24,7 +24,7 @@ const CompactPatientSearchComponent: React.FC<CompactPatientSearchProps> = ({
}) => {
const [searchTerm, setSearchTerm] = useState(initialSearchTerm);
const debouncedSearchTerm = useDebounce(searchTerm);
const hasSearchTerm = useMemo(() => Boolean(debouncedSearchTerm.trim()), [debouncedSearchTerm]);
const hasSearchTerm = Boolean(debouncedSearchTerm.trim());
const bannerContainerRef = useRef(null);
const searchInputRef = useRef<HTMLInputElement>(null);
const config = useConfig();
Expand Down

0 comments on commit 31cc083

Please sign in to comment.