import { Autocomplete, Box, Card, CardContent, Stack, TextField } from '@mui/material'; import Grid from '@mui/material/Grid'; import Typography from '@mui/material/Typography'; import SearchIcon from '@mui/icons-material/Search'; import { Link, useNavigate } from 'react-router-dom'; import { filterTools, getToolsByCategory, tools } from '../../tools'; import { useState } from 'react'; import { DefinedTool } from '@tools/defineTool'; import Button from '@mui/material/Button'; const exampleTools: { label: string; url: string }[] = [ { label: 'Create a transparent image', url: '' }, { label: 'Convert text to morse code', url: '/string/to-morse' }, { label: 'Change GIF speed', url: '' }, { label: 'Pick a random item', url: '' }, { label: 'Find and replace text', url: '' }, { label: 'Convert emoji to image', url: '' }, { label: 'Split a string', url: '/string/split' }, { label: 'Calculate number sum', url: '/number/sum' }, { label: 'Pixelate an image', url: '' } ]; export default function Home() { const navigate = useNavigate(); const [inputValue, setInputValue] = useState(''); const [filteredTools, setFilteredTools] = useState(tools); const handleInputChange = ( event: React.ChangeEvent<{}>, newInputValue: string ) => { setInputValue(newInputValue); setFilteredTools(filterTools(tools, newInputValue)); }; return ( Transform Your Workflow with Omni Tools Boost your productivity with Omni Tools, the ultimate toolkit for getting things done quickly! Access thousands of user-friendly utilities for editing images, text, lists, and data, all directly from your browser. option.name} renderInput={(params) => ( }} onChange={(event) => handleInputChange(event, event.target.value)} /> )} renderOption={(props, option) => ( navigate(option.path)} > {option.name} {option.description} )} /> {exampleTools.map((tool) => ( navigate(tool.url)} item xs={4} key={tool.label} > {tool.label} ))} {getToolsByCategory().map((category) => ( {category.title} {category.description} ))} ); }