From 96c78390fa13c357d4b5dda486fc87121abb96fb Mon Sep 17 00:00:00 2001 From: Gerard Date: Mon, 18 Nov 2024 11:27:50 +0100 Subject: [PATCH] use Wrapper component --- src/components/Home/Clients.tsx | 7 ++++--- src/components/Home/CreateProcess.tsx | 18 ++++-------------- src/components/Home/Features.tsx | 18 ++++-------------- src/components/Home/StartNow.tsx | 14 ++++++-------- src/components/Home/UseCases.tsx | 18 ++++-------------- src/components/Layout/Wrapper.tsx | 26 +++++++++++--------------- 6 files changed, 33 insertions(+), 68 deletions(-) diff --git a/src/components/Home/Clients.tsx b/src/components/Home/Clients.tsx index 64d283c9..2c2d4087 100644 --- a/src/components/Home/Clients.tsx +++ b/src/components/Home/Clients.tsx @@ -1,5 +1,6 @@ -import { Box, Card, CardBody, CardHeader, Grid, Image, Text } from '@chakra-ui/react' +import { Card, CardBody, CardHeader, Grid, Image, Text } from '@chakra-ui/react' import { useTranslation } from 'react-i18next' +import Wrapper from '~components/Layout/Wrapper' import barca from '/assets/barca.png' import bellpuig from '/assets/bellpuig.svg.png' import berga from '/assets/berga.svg.png' @@ -15,7 +16,7 @@ const Clients = () => { const { t } = useTranslation() return ( - + {t('clients', { defaultValue: 'Trusted by leading organizations' })} @@ -115,7 +116,7 @@ const Clients = () => { - + ) } export default Clients diff --git a/src/components/Home/CreateProcess.tsx b/src/components/Home/CreateProcess.tsx index ced440db..1f08798e 100644 --- a/src/components/Home/CreateProcess.tsx +++ b/src/components/Home/CreateProcess.tsx @@ -1,6 +1,7 @@ -import { Box, Button, Flex, Image, Text } from '@chakra-ui/react' +import { Box, Button, Image, Text } from '@chakra-ui/react' import { useTranslation } from 'react-i18next' import { Link as ReactRouterLink } from 'react-router-dom' +import Wrapper from '~components/Layout/Wrapper' import { Routes } from '~src/router/routes' import devices from '/assets/devices_vocdoni.png' @@ -8,18 +9,7 @@ const CreateProcess = () => { const { t } = useTranslation() return ( - + {t('home.create_process.title')} @@ -34,7 +24,7 @@ const CreateProcess = () => { - + ) } diff --git a/src/components/Home/Features.tsx b/src/components/Home/Features.tsx index 1f7ae430..24a12e81 100644 --- a/src/components/Home/Features.tsx +++ b/src/components/Home/Features.tsx @@ -1,5 +1,6 @@ -import { Box, Card, CardBody, CardHeader, Grid, Text } from '@chakra-ui/react' +import { Card, CardBody, CardHeader, Grid, Text } from '@chakra-ui/react' import { useTranslation } from 'react-i18next' +import Wrapper from '~components/Layout/Wrapper' type FeaturesItem = { title: string @@ -47,18 +48,7 @@ const Features = () => { }, ] return ( - + {t('features', { defaultValue: 'Key Features' })} @@ -70,7 +60,7 @@ const Features = () => { ))} - + ) } diff --git a/src/components/Home/StartNow.tsx b/src/components/Home/StartNow.tsx index debc4cd9..571865df 100644 --- a/src/components/Home/StartNow.tsx +++ b/src/components/Home/StartNow.tsx @@ -1,20 +1,18 @@ -import { Button, Flex, Text } from '@chakra-ui/react' +import { Button, Text } from '@chakra-ui/react' import { useTranslation } from 'react-i18next' +import Wrapper from '~components/Layout/Wrapper' const StartNow = () => { const { t } = useTranslation() return ( - { {t('', { defaultValue: 'Join thousands of organizations making better decisions with VotingPlatform.' })} - + ) } diff --git a/src/components/Home/UseCases.tsx b/src/components/Home/UseCases.tsx index 9f0922f1..779db7bc 100644 --- a/src/components/Home/UseCases.tsx +++ b/src/components/Home/UseCases.tsx @@ -1,5 +1,6 @@ -import { Box, Heading, Tab, TabList, TabPanel, TabPanels, Tabs, Text } from '@chakra-ui/react' +import { Heading, Tab, TabList, TabPanel, TabPanels, Tabs, Text } from '@chakra-ui/react' import { useTranslation } from 'react-i18next' +import Wrapper from '~components/Layout/Wrapper' type UseCasesItem = { tab: string @@ -52,18 +53,7 @@ const UseCases = () => { }, ] return ( - + {t('use_cases', { defaultValue: 'Use Cases' })} @@ -82,7 +72,7 @@ const UseCases = () => { ))} - + ) } diff --git a/src/components/Layout/Wrapper.tsx b/src/components/Layout/Wrapper.tsx index b5d3b075..c8572339 100644 --- a/src/components/Layout/Wrapper.tsx +++ b/src/components/Layout/Wrapper.tsx @@ -1,20 +1,16 @@ -import { Box, Flex } from '@chakra-ui/react' +import { Box } from '@chakra-ui/react' const Wrapper = ({ ...props }) => ( - - - + ) export default Wrapper