import { Box, Heading, HStack, Input, InputGroup, InputRightElement, Select, } from '@chakra-ui/react'; import { nanoid } from '@reduxjs/toolkit'; import React from 'react'; import { FiSearch } from 'react-icons/fi'; import { useLocation } from 'react-router-dom'; import { SecondaryBtn } from '../../utils/Buttons'; const Header = ({ readingCount, archiveCount, allTags, selectedTagName, handleClickTag, handleSearch, toggleViewArchive, }) => { const location = useLocation(); const handleSelectOption = ({ target }) => { handleClickTag(target.value); }; const queryParam = new URLSearchParams(location.search); const query = queryParam.get(''); const title = query ? `Archive (${archiveCount})` : `Reading list (${readingCount})`; return ( {title} {query ? 'View reading list' : 'View archive'} {title} {query ? 'View Reading List' : 'View archive'} } /> ); }; export default Header;