♻️(frontend) improve CardCreateTeam component

- remove link wrapping cancel button and
tabIndex=-1 to button
This commit is contained in:
daproclaima
2024-09-10 14:02:32 +02:00
committed by Sebastien Nobour
parent ee5a785d43
commit c0cd136618

View File

@@ -4,7 +4,7 @@ import { useState } from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import IconGroup from '@/assets/icons/icon-group2.svg'; import IconGroup from '@/assets/icons/icon-group2.svg';
import { Box, Card, StyledLink, Text } from '@/components'; import { Box, Card, Text } from '@/components';
import { useCunninghamTheme } from '@/cunningham'; import { useCunninghamTheme } from '@/cunningham';
import { useCreateTeam } from '../api'; import { useCreateTeam } from '../api';
@@ -56,11 +56,10 @@ export const CardCreateTeam = () => {
/> />
</Box> </Box>
<Box $justify="space-between" $direction="row" $align="center"> <Box $justify="space-between" $direction="row" $align="center">
<StyledLink href="/"> <Button color="secondary" onClick={() => router.push('/')}>
<Button color="secondary" tabIndex={-1}> {t('Cancel')}
{t('Cancel')} </Button>
</Button>
</StyledLink>
<Button <Button
onClick={() => createTeam(teamName)} onClick={() => createTeam(teamName)}
disabled={!teamName || isPending} disabled={!teamName || isPending}