diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 7dc080b..6860354 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,20 +4,9 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -345,23 +334,7 @@
-
-
-
-
- 1740324069359
-
-
-
- 1740324069359
-
-
-
- 1740324274955
-
-
-
- 1740324274955
+
@@ -739,7 +712,23 @@
1741542318259
-
+
+
+ 1741543593426
+
+
+
+ 1741543593427
+
+
+
+ 1741543732607
+
+
+
+ 1741543732607
+
+
@@ -786,7 +775,6 @@
-
@@ -809,9 +797,10 @@
-
-
+
+
+
diff --git a/src/pages/tools/number/sum/index.tsx b/src/pages/tools/number/sum/index.tsx
index 3c2b3e8..1b150ba 100644
--- a/src/pages/tools/number/sum/index.tsx
+++ b/src/pages/tools/number/sum/index.tsx
@@ -1,20 +1,14 @@
-import { Box } from '@mui/material';
-import React, { useRef, useState } 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 { compute, NumberExtractionType } from './service';
import RadioWithTextField from '@components/options/RadioWithTextField';
import SimpleRadio from '@components/options/SimpleRadio';
import CheckboxWithDesc from '@components/options/CheckboxWithDesc';
-import ToolInputAndResult from '@components/ToolInputAndResult';
-import ToolExamples, {
- CardExampleType
-} from '@components/examples/ToolExamples';
-import ToolInfo from '@components/ToolInfo';
-import Separator from '@components/Separator';
+import { CardExampleType } from '@components/examples/ToolExamples';
import { ToolComponentProps } from '@tools/defineTool';
-import { FormikProps } from 'formik';
+import ToolContent from '@components/ToolContent';
const initialValues = {
extractionType: 'smart' as NumberExtractionType,
@@ -126,7 +120,6 @@ const exampleCards: CardExampleType[] = [
export default function SumNumbers({ title }: ToolComponentProps) {
const [input, setInput] = useState('');
const [result, setResult] = useState('');
- const formRef = useRef>(null);
const getGroups: GetGroupsType = ({
values,
@@ -175,33 +168,24 @@ export default function SumNumbers({ title }: ToolComponentProps) {
}
];
return (
-
- }
- result={}
- />
- {
- const { extractionType, printRunningSum, separator } = optionsValues;
- setResult(compute(input, extractionType, printRunningSum, separator));
- }}
- initialValues={initialValues}
- input={input}
- />
-
-
-
-
+ }
+ resultComponent={}
+ initialValues={initialValues}
+ getGroups={getGroups}
+ compute={(optionsValues, input) => {
+ const { extractionType, printRunningSum, separator } = optionsValues;
+ setResult(compute(input, extractionType, printRunningSum, separator));
+ }}
+ setInput={setInput}
+ toolInfo={{
+ title: 'What Is a Number Sum Calculator?',
+ description:
+ 'This is an online browser-based utility for calculating the sum of a bunch of numbers. You can enter the numbers separated by a comma, space, or any other character, including the line break. You can also simply paste a fragment of textual data that contains numerical values that you want to sum up and the utility will extract them and find their sum.'
+ }}
+ exampleCards={exampleCards}
+ />
);
}