Merge remote-tracking branch 'origin/string-join'

# Conflicts:
#	.idea/workspace.xml
#	src/tools/defineTool.tsx
This commit is contained in:
Ibrahima G. Coulibaly
2024-06-25 22:12:04 +01:00
27 changed files with 730 additions and 143 deletions

View File

@@ -2,6 +2,10 @@ import { Box } from '@mui/material';
import React, { ReactNode } from 'react';
import { Helmet } from 'react-helmet';
import ToolHeader from './ToolHeader';
import Separator from '@tools/Separator';
import AllTools from './allTools/AllTools';
import { getToolsByCategory } from '@tools/index';
import { capitalizeFirstLetter } from '../utils/string';
export default function ToolLayout({
children,
@@ -15,7 +19,18 @@ export default function ToolLayout({
image?: string;
type: string;
children: ReactNode;
type: string;
}) {
const otherCategoryTools =
getToolsByCategory()
.find((category) => category.type === type)
?.tools.filter((tool) => tool.name !== title)
.map((tool) => ({
title: tool.name,
description: tool.shortDescription,
link: '/' + tool.path
})) ?? [];
return (
<Box
width={'100%'}
@@ -34,6 +49,11 @@ export default function ToolLayout({
type={type}
/>
{children}
<Separator backgroundColor="#5581b5" margin="50px" />
<AllTools
title={`All ${capitalizeFirstLetter(type)} tools`}
toolCards={otherCategoryTools}
/>
</Box>
</Box>
);