feat: tools normalized

This commit is contained in:
Ibrahima G. Coulibaly
2024-06-22 22:06:16 +01:00
parent 17ba68be34
commit 23f50ffead
36 changed files with 2625 additions and 1045 deletions

View File

@@ -1,10 +0,0 @@
import {RouteObject} from "react-router-dom";
import {lazy} from "react";
const StringHome = lazy(() => import("./index"));
const StringSplit = lazy(() => import("./split"));
export const StringConfig: RouteObject[] = [
{path: '', element: <StringHome/>},
{path: 'split', element: <StringSplit/>},
]

View File

@@ -1,5 +1,5 @@
import {Box} from "@mui/material";
import { Box } from '@mui/material';
export default function StringHome() {
return (<Box></Box>)
return <Box></Box>;
}

View File

@@ -186,12 +186,7 @@ export default function SplitText() {
});
return (
<ToolLayout
title={'Text Splitter'}
description={
"World's simplest browser-based utility for splitting text. Load your text in the input form on the left and you'll automatically get pieces of this text on the right. Powerful, free, and fast. Load text get chunks."
}
>
<Box>
<Grid container spacing={2}>
<Grid item xs={6}>
<ToolTextInput value={input} onChange={setInput} />
@@ -242,6 +237,6 @@ export default function SplitText() {
)}
</Formik>
</ToolOptions>
</ToolLayout>
</Box>
);
}

View File

@@ -0,0 +1,11 @@
import { defineTool } from '../../../tools/defineTool';
import { lazy } from 'react';
export const tool = defineTool('string', {
path: 'split',
name: 'Text splitter',
description:
"World's simplest browser-based utility for splitting text. Load your text in the input form on the left and you'll automatically get pieces of this text on the right. Powerful, free, and fast. Load text get chunks.",
keywords: ['text', 'split'],
component: lazy(() => import('./index'))
});

View File

@@ -0,0 +1,3 @@
import { tool as stringSplit } from './split/meta';
export const stringTools = [stringSplit];