diff --git a/domains/dashboard/Dashboard.tsx b/domains/dashboard/Dashboard.tsx index b887b1c..7b1cebe 100644 --- a/domains/dashboard/Dashboard.tsx +++ b/domains/dashboard/Dashboard.tsx @@ -22,7 +22,7 @@ interface Props { clinicalData: QueryProps | null; } -const Dashboard: FC = ({ clinicalData }): ReactNode => { +const Dashboard = memo(function Dashboard({ clinicalData }: Props): ReactNode { const { loading, data, error } = useFetchDataset(); const { getImage, screenshotRef } = useScreenshot(); @@ -75,6 +75,6 @@ const Dashboard: FC = ({ clinicalData }): ReactNode => { ); -}; +}); export { Dashboard }; diff --git a/pages/_app.tsx b/pages/_app.tsx index c9bd1cd..e798515 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -45,10 +45,10 @@ const MyApp = ({ Component, pageProps }: AppProps): ReactNode => { <> Covid-19 Insights - + { - + -
diff --git a/shared/components/SelectCity/SelectCity.tsx b/shared/components/SelectCity/SelectCity.tsx index 3a3780c..93ddc1b 100644 --- a/shared/components/SelectCity/SelectCity.tsx +++ b/shared/components/SelectCity/SelectCity.tsx @@ -1,7 +1,7 @@ import { cities } from '@/services/graphql/query'; import { useQuery } from '@apollo/client'; import { Select } from 'antd'; -import { useState, type ComponentProps, type FC } from 'react'; +import { type ComponentProps, type FC } from 'react'; import { useSelectCityStore } from '@/domains/dashboard/store'; interface Props extends ComponentProps {} @@ -46,7 +46,7 @@ const SelectCity: FC = (props) => { onSelect={(value: string | unknown, { label }) => { handleSelectCity(value, label); }} - filterOption={(input, option) => (option?.label ?? '').includes(input)} + filterOption={(input, option) => (option?.label ?? '').toLowerCase().includes(input)} filterSort={(optionA, optionB) => (optionA?.label ?? '').toLowerCase().localeCompare((optionB?.label ?? '').toLowerCase()) }