diff --git a/src/Tasks/Toolbar.tsx b/src/Tasks/Toolbar.tsx index 10b1957..2fd877b 100644 --- a/src/Tasks/Toolbar.tsx +++ b/src/Tasks/Toolbar.tsx @@ -6,7 +6,6 @@ import MoreVertIcon from "@material-ui/icons/MoreVert"; import MenuItem from "@material-ui/core/MenuItem"; import SortIcon from "@material-ui/icons/Sort"; import SearchIcon from "@material-ui/icons/Search"; -import CloseIcon from "@material-ui/icons/Close"; import TextField from "@material-ui/core/TextField"; import { makeStyles } from "@material-ui/core/styles"; import { Transition } from "react-transition-group"; @@ -56,23 +55,16 @@ interface PropsType { export default function Toolbar(props: PropsType) { const { showCompleted, setShowCompleted, searchTerm, setSearchTerm, showHidden, setShowHidden } = props; - const [showSearchField, setShowSearchField] = React.useState(false); const [sortAnchorEl, setSortAnchorEl] = React.useState(null); const [optionsAnchorEl, setOptionsAnchorEl] = React.useState(null); + const showSearchField = true; const classes = useStyles(); const dispatch = useDispatch(); const taskSettings = useSelector((state: StoreState) => state.settings.taskSettings); const { sortBy } = taskSettings; - const toggleSearchField = () => { - if (showSearchField) { - setSearchTerm(""); - } - setShowSearchField(!showSearchField); - }; - const handleSortChange = (sort: string) => { dispatch(setSettings({ taskSettings: { ...taskSettings, sortBy: sort } })); setSortAnchorEl(null); @@ -108,12 +100,6 @@ export default function Toolbar(props: PropsType) { )} -
- - {showSearchField ? : } - -
-