From 94d4b4431d45271646568ddadf7d562aca1825ee Mon Sep 17 00:00:00 2001 From: rahul_g Date: Tue, 30 Jul 2024 18:09:05 +0530 Subject: [PATCH] resolved sonarcloud issue --- src/components/layouts/header/SearchBar.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/layouts/header/SearchBar.tsx b/src/components/layouts/header/SearchBar.tsx index f0d9af94..4e6346d4 100644 --- a/src/components/layouts/header/SearchBar.tsx +++ b/src/components/layouts/header/SearchBar.tsx @@ -2,6 +2,7 @@ import SearchIcon from "@mui/icons-material/Search"; import { IconButton, InputBase, Paper, useMediaQuery } from "@mui/material"; import { styled } from "@mui/system"; import React, { useState } from "react"; +import { useTranslation } from "react-i18next"; interface SearchBarProps { onSearch: (keyword: string) => void; @@ -27,6 +28,7 @@ const StyledInputBase = styled(InputBase)(({ theme }) => ({ const SearchBar: React.FC = ({ onSearch, placeholder }) => { const [keyword, setKeyword] = useState(""); + const { t } = useTranslation(); const isSmallScreen = useMediaQuery((theme: any) => theme.breakpoints.down("sm") ); @@ -51,7 +53,7 @@ const SearchBar: React.FC = ({ onSearch, placeholder }) => { return (