\n \n \n \n {\n dispatch(setSearchText(v.target.value))\n }}\n InputProps={{\n startAdornment: \n search\n ,\n }}\n />\n \n
\n = SEARCH_MODE_LENGTH}\n rows={rows.map(r => ({name: r.name, id: r.id, caught: caught.includes(r.name)} as ITableEntry))}\n onCaught={(value) => dispatch(toggleCaughtPokemon(value))}\n onClick={(v) => {\n setLocation(`/${v}`)\n }}\n rowsPerPage={rowsPerPage}\n page={page}\n onPageChange={onPageChange}\n onRowsPerPageChange={onRowsPerPageChange}\n />\n \n}","import React, {useState} from 'react'\nimport {Typography} from \"@mui/material\";\nimport startCase from \"lodash/startCase\";\nimport {makeStyles} from \"@mui/styles\";\nimport {ILocation} from \"../../models/interfaces\";\n\ninterface IProps {\n locations: ILocation[];\n}\n\nconst useStyles = makeStyles({\n link: {\n textDecoration: \"none\",\n color: \"inherit\",\n cursor: \"pointer\"\n }\n})\n\nconst MAX_LOCATIONS = 3;\n\nexport default function PokemonLocations(props: IProps) {\n\n const {locations} = props;\n const [expanded, setExpanded] = useState(false);\n const classes = useStyles();\n\n const locationsReduced = expanded ? locations : locations.slice(0,MAX_LOCATIONS);\n const showExtra = locations.length > MAX_LOCATIONS;\n\n return (\n <>\n