2024-06-24 20:09:16 -07:00
|
|
|
import { Box, Grid, Stack, Typography } from '@mui/material';
|
|
|
|
|
import ToolCard from './ToolCard';
|
2025-03-02 17:28:45 +00:00
|
|
|
import { IconifyIcon } from '@iconify/react';
|
2025-07-14 14:51:46 +01:00
|
|
|
import { useTranslation } from 'react-i18next';
|
|
|
|
|
import { FullI18nKey } from '../../i18n';
|
2024-06-24 20:09:16 -07:00
|
|
|
|
|
|
|
|
export interface ToolCardProps {
|
2025-07-14 14:51:46 +01:00
|
|
|
title: FullI18nKey;
|
|
|
|
|
description: FullI18nKey;
|
2024-06-24 20:09:16 -07:00
|
|
|
link: string;
|
2025-03-02 17:28:45 +00:00
|
|
|
icon: IconifyIcon | string;
|
2024-06-24 20:09:16 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
interface AllToolsProps {
|
|
|
|
|
title: string;
|
|
|
|
|
toolCards: ToolCardProps[];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default function AllTools({ title, toolCards }: AllToolsProps) {
|
2025-07-14 14:51:46 +01:00
|
|
|
const { t } = useTranslation();
|
2024-06-24 20:09:16 -07:00
|
|
|
return (
|
|
|
|
|
<Box mt={4} mb={10}>
|
|
|
|
|
<Typography mb={2} fontSize={30} color={'primary'}>
|
|
|
|
|
{title}
|
|
|
|
|
</Typography>
|
|
|
|
|
<Stack direction={'row'} alignItems={'center'} spacing={2}>
|
|
|
|
|
<Grid container spacing={2}>
|
2024-06-24 21:00:42 -07:00
|
|
|
{toolCards.map((card, index) => (
|
2024-06-26 00:47:21 +01:00
|
|
|
<Grid item xs={12} md={6} lg={4} key={index}>
|
2024-06-24 20:09:16 -07:00
|
|
|
<ToolCard
|
2025-07-14 14:51:46 +01:00
|
|
|
//@ts-ignore
|
|
|
|
|
title={t(card.title)}
|
|
|
|
|
//@ts-ignore
|
|
|
|
|
description={t(card.description)}
|
2024-06-24 20:09:16 -07:00
|
|
|
link={card.link}
|
2025-03-02 17:28:45 +00:00
|
|
|
icon={card.icon}
|
2024-06-24 20:09:16 -07:00
|
|
|
/>
|
|
|
|
|
</Grid>
|
|
|
|
|
))}
|
|
|
|
|
</Grid>
|
|
|
|
|
</Stack>
|
|
|
|
|
</Box>
|
|
|
|
|
);
|
|
|
|
|
}
|