diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index cc03389..e2cfa8d 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,15 +4,9 @@
-
+
-
-
-
-
-
-
@@ -339,15 +333,7 @@
-
-
-
-
- 1740267666455
-
-
-
- 1740267666455
+
@@ -733,7 +719,15 @@
1741480927080
-
+
+
+ 1741483345639
+
+
+
+ 1741483345639
+
+
@@ -792,7 +786,6 @@
-
@@ -817,7 +810,8 @@
-
+
+
diff --git a/src/pages/tools/string/extract-substring/index.tsx b/src/pages/tools/string/extract-substring/index.tsx
index a5b7a5e..43756a0 100644
--- a/src/pages/tools/string/extract-substring/index.tsx
+++ b/src/pages/tools/string/extract-substring/index.tsx
@@ -1,17 +1,13 @@
-import { Box } from '@mui/material';
-import React, { useState, useRef } from 'react';
+import React, { useState } from 'react';
import ToolTextInput from '@components/input/ToolTextInput';
import ToolTextResult from '@components/result/ToolTextResult';
-import ToolOptions, { GetGroupsType } from '@components/options/ToolOptions';
+import { GetGroupsType } from '@components/options/ToolOptions';
import { extractSubstring } from './service';
import TextFieldWithDesc from '@components/options/TextFieldWithDesc';
import CheckboxWithDesc from '@components/options/CheckboxWithDesc';
-import ToolInputAndResult from '@components/ToolInputAndResult';
-import ToolExamples, {
- CardExampleType
-} from '@components/examples/ToolExamples';
+import { CardExampleType } from '@components/examples/ToolExamples';
import { ToolComponentProps } from '@tools/defineTool';
-import { FormikProps } from 'formik';
+import ToolContent from '@components/ToolContent';
const initialValues = {
start: '1',
@@ -48,7 +44,7 @@ const exampleCards: CardExampleType[] = [
title: 'Multi-line Extraction with Reversal',
description: 'Extract characters 1-3 from each line and reverse them.',
sampleText: 'First line\nSecond line\nThird line',
- sampleResult: 'riF\neS\nihT',
+ sampleResult: 'riF\nceS\nihT',
sampleOptions: {
...initialValues,
start: '1',
@@ -62,7 +58,6 @@ const exampleCards: CardExampleType[] = [
export default function ExtractSubstring({ title }: ToolComponentProps) {
const [input, setInput] = useState('');
const [result, setResult] = useState('');
- const formRef = useRef>(null);
const computeExternal = (
optionsValues: typeof initialValues,
@@ -128,25 +123,20 @@ export default function ExtractSubstring({ title }: ToolComponentProps) {
];
return (
-
- }
- result={}
- />
-
-
-
+
+ }
+ resultComponent={
+
+ }
+ exampleCards={exampleCards}
+ />
);
}