diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index c5fd94f..1a4f227 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,12 +4,8 @@
-
+
-
-
-
-
@@ -401,15 +397,7 @@
-
-
-
-
- 1740661540908
-
-
-
- 1740661540908
+
@@ -795,7 +783,15 @@
1743566704552
-
+
+
+ 1743567906528
+
+
+
+ 1743567906528
+
+
@@ -842,7 +838,6 @@
-
@@ -867,7 +862,8 @@
-
+
+
diff --git a/src/tools/index.ts b/src/tools/index.ts
index 3ca189a..0f6e048 100644
--- a/src/tools/index.ts
+++ b/src/tools/index.ts
@@ -12,6 +12,19 @@ import { timeTools } from '../pages/tools/time';
import { IconifyIcon } from '@iconify/react';
import { pdfTools } from '../pages/tools/pdf';
+const toolCategoriesOrder: ToolCategory[] = [
+ 'png',
+ 'string',
+ 'json',
+ 'pdf',
+ 'list',
+ 'csv',
+ 'video',
+ 'number',
+ 'gif',
+ 'time',
+ 'image-generic'
+];
export const tools: DefinedTool[] = [
...imageTools,
...stringTools,
@@ -133,14 +146,14 @@ export const getToolsByCategory = (): {
rawTitle: string;
description: string;
icon: IconifyIcon | string;
- type: string;
+ type: ToolCategory;
example: { title: string; path: string };
tools: DefinedTool[];
}[] => {
const groupedByType: Partial> =
Object.groupBy(tools, ({ type }) => type);
- return (Object.entries(groupedByType) as Entries).map(
- ([type, tools]) => {
+ return (Object.entries(groupedByType) as Entries)
+ .map(([type, tools]) => {
const categoryConfig = categoriesConfig.find(
(config) => config.type === type
);
@@ -155,6 +168,10 @@ export const getToolsByCategory = (): {
? { title: tools[0].name, path: tools[0].path }
: { title: '', path: '' }
};
- }
- );
+ })
+ .sort(
+ (a, b) =>
+ toolCategoriesOrder.indexOf(a.type) -
+ toolCategoriesOrder.indexOf(b.type)
+ );
};