Skip to content
This repository has been archived by the owner on Oct 7, 2023. It is now read-only.

Commit

Permalink
fix: select city case insensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
rwietter committed Jul 12, 2023
1 parent f0c89a5 commit ba24a8f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions domains/dashboard/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ interface Props {
clinicalData: QueryProps | null;
}

const Dashboard: FC<Props> = ({ clinicalData }): ReactNode => {
const Dashboard = memo(function Dashboard({ clinicalData }: Props): ReactNode {
const { loading, data, error } = useFetchDataset();
const { getImage, screenshotRef } = useScreenshot();

Expand Down Expand Up @@ -75,6 +75,6 @@ const Dashboard: FC<Props> = ({ clinicalData }): ReactNode => {
</main>
</div>
);
};
});

export { Dashboard };
6 changes: 3 additions & 3 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ const MyApp = ({ Component, pageProps }: AppProps): ReactNode => {
<>
<Head>
<title>Covid-19 Insights</title>
<meta name='title' content='Insightcore' />
<meta name='title' content='Covid Insights' />
<meta
name='description'
content='Insightcore ajuda você a ter uma visão completa da pandemia do COVID-19 no Brasil'
content='Covid Insights ajuda você a ter uma visão completa da pandemia do COVID-19 no Brasil'
/>
<meta
name='viewport'
Expand All @@ -60,7 +60,7 @@ const MyApp = ({ Component, pageProps }: AppProps): ReactNode => {
<meta name='X-UA-Compatible' content='IE=edge' />
<meta name='robots' content='index, follow' />
<meta name='googlebot' content='index, follow' />
<meta name='author' content='Insightcore' />
<meta name='author' content='Covid Insights' />
<link rel='icon' href='/favicon.ico' type='image/x-icon' />
<meta
name='keywords'
Expand Down
1 change: 0 additions & 1 deletion pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export default function Document(): ReactNode {
/>
<link rel='preconnect' href='https://rsms.me/' />
<link rel='stylesheet' href='https://rsms.me/inter/inter.css' />
<script src='particles.js'></script>
</Head>
<body>
<Main />
Expand Down
4 changes: 2 additions & 2 deletions shared/components/SelectCity/SelectCity.tsx
Original file line number Diff line number Diff line change
@@ -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<typeof Select> {}
Expand Down Expand Up @@ -46,7 +46,7 @@ const SelectCity: FC<Props> = (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())
}
Expand Down

0 comments on commit ba24a8f

Please sign in to comment.