diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index cad18b2..0e86a3c 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,16 +4,10 @@
-
-
-
-
-
+
-
-
-
-
+
+
@@ -415,31 +409,9 @@
-
-
-
-
- 1741211604972
-
-
-
- 1741211604972
-
-
-
- 1741414797155
-
-
-
- 1741414797155
-
-
-
- 1741416193639
-
-
-
- 1741416193639
+
+
+
@@ -809,7 +781,31 @@
1743705749057
-
+
+
+ 1743710133267
+
+
+
+ 1743710133267
+
+
+
+ 1743710669869
+
+
+
+ 1743710669869
+
+
+
+ 1743811980098
+
+
+
+ 1743811980098
+
+
@@ -856,9 +852,6 @@
-
-
-
@@ -881,7 +874,10 @@
-
+
+
+
+
diff --git a/src/components/Hero.tsx b/src/components/Hero.tsx
index ca75443..6138575 100644
--- a/src/components/Hero.tsx
+++ b/src/components/Hero.tsx
@@ -35,7 +35,7 @@ export default function Hero() {
newInputValue: string
) => {
setInputValue(newInputValue);
- setFilteredTools(_.shuffle(filterTools(tools, newInputValue)));
+ setFilteredTools(filterTools(tools, newInputValue));
};
return (
diff --git a/src/pages/tools-by-category/index.tsx b/src/pages/tools-by-category/index.tsx
index 2aa1225..5549fde 100644
--- a/src/pages/tools-by-category/index.tsx
+++ b/src/pages/tools-by-category/index.tsx
@@ -1,8 +1,8 @@
-import { Box, Divider, Stack, useTheme } from '@mui/material';
+import { Box, Divider, Stack, TextField, useTheme } from '@mui/material';
import Grid from '@mui/material/Grid';
import Typography from '@mui/material/Typography';
import { Link, useNavigate, useParams } from 'react-router-dom';
-import { getToolsByCategory } from '../../tools';
+import { filterTools, getToolsByCategory } from '../../tools';
import Hero from 'components/Hero';
import { capitalizeFirstLetter } from '@utils/string';
import { Icon } from '@iconify/react';
@@ -12,12 +12,14 @@ import IconButton from '@mui/material/IconButton';
import { ArrowBack } from '@mui/icons-material';
import BackButton from '@components/BackButton';
import ArrowBackIcon from '@mui/icons-material/ArrowBack';
+import SearchIcon from '@mui/icons-material/Search';
-export default function Home() {
+export default function ToolsByCategory() {
const navigate = useNavigate();
const theme = useTheme();
const mainContentRef = React.useRef(null);
const { categoryName } = useParams();
+ const [searchTerm, setSearchTerm] = React.useState('');
useEffect(() => {
if (mainContentRef.current) {
@@ -39,62 +41,81 @@ export default function Home() {
-
- navigate('/')}>
-
-
- {`All ${
- getToolsByCategory().find(
- (category) => category.type === categoryName
- )!.rawTitle
- } Tools`}
+
+
+ navigate('/')}>
+
+
+ {`All ${
+ getToolsByCategory().find(
+ (category) => category.type === categoryName
+ )!.rawTitle
+ } Tools`}
+
+ ,
+ sx: {
+ borderRadius: 4,
+ backgroundColor: 'background.paper',
+ maxWidth: 400
+ }
+ }}
+ onChange={(event) => setSearchTerm(event.target.value)}
+ />
- {getToolsByCategory()
- .find(({ type }) => type === categoryName)
- ?.tools?.map((tool, index) => (
-
- navigate('/' + tool.path)}
- direction={'row'}
- alignItems={'center'}
- spacing={2}
- padding={2}
- border={`1px solid ${theme.palette.background.default}`}
- borderRadius={2}
- >
-
-
-
- {tool.name}
-
-
- {tool.shortDescription}
-
-
-
-
- ))}
+ {filterTools(
+ getToolsByCategory().find(({ type }) => type === categoryName)
+ ?.tools ?? [],
+ searchTerm
+ ).map((tool, index) => (
+
+ navigate('/' + tool.path)}
+ direction={'row'}
+ alignItems={'center'}
+ spacing={2}
+ padding={2}
+ border={`1px solid ${theme.palette.background.default}`}
+ borderRadius={2}
+ >
+
+
+
+ {tool.name}
+
+
+ {tool.shortDescription}
+
+
+
+
+ ))}