Skip to content

Commit

Permalink
chore: minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Franqsanz committed Nov 10, 2023
1 parent 84b3ca9 commit bb32fa6
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 19 deletions.
30 changes: 16 additions & 14 deletions src/components/MyLink.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { NavLink } from 'react-router-dom';
import { Link, useColorModeValue } from '@chakra-ui/react';
import { Box, Flex, Link, useColorModeValue } from '@chakra-ui/react';

import { MyLinkType } from './types';

Expand All @@ -9,18 +9,20 @@ export function MyLink({ data, href, external, index }: MyLinkType) {
const colorLinkHoverCategory = useColorModeValue('green.900', 'green.700');

return (
<Link
as={NavLink}
to={href}
color={colorLinkCategory}
isExternal={external}
_hover={{
color: `${colorLinkHoverCategory}`,
textDecoration: 'underline',
}}
>
{data}
{index || null}
</Link>
<>
<Link
as={NavLink}
to={href}
color={colorLinkCategory}
isExternal={external}
_hover={{
color: `${colorLinkHoverCategory}`,
textDecoration: 'underline',
}}
>
{data}
</Link>
<Box mx='2'>{index || null}</Box>
</>
);
}
2 changes: 1 addition & 1 deletion src/components/forms/NewBook.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export function FormNewBook() {
// 1 MB
if (file.size > 1000000) {
alert(
`El tamaño de la imagen es demasiado grande. Por favor, seleccione una imagen de menor tamaño.`,
`El tamaño de la imagen es mayor a 1 MB. Por favor, seleccione una imagen de menor tamaño.`,
);

return;
Expand Down
8 changes: 4 additions & 4 deletions src/pages/Book.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export default function Book() {
>
{data.title}
</Box>
<Box
<Flex
my='1'
fontSize={{ base: 'md', md: 'xl' }}
textTransform='uppercase'
Expand All @@ -188,7 +188,7 @@ export default function Book() {
index={index !== data.authors.length - 1 && ' & '}
/>
))}
</Box>
</Flex>
<Box mt='5'>
<Box p='2' fontSize='lg' bg={grayColor} roundedTop='lg'>
Sinopsis
Expand All @@ -208,7 +208,7 @@ export default function Book() {
<Box as='span'>Autor(s):</Box>
</Box>
<Box>
<Box as='span'>
<Flex as='span'>
{data.authors.map((author, index) => (
<MyLink
external={true}
Expand All @@ -218,7 +218,7 @@ export default function Book() {
index={index !== data.authors.length - 1 && ' & '}
/>
))}
</Box>
</Flex>
</Box>
</Flex>
<Flex my='2'>
Expand Down

1 comment on commit bb32fa6

@vercel
Copy link

@vercel vercel bot commented on bb32fa6 Nov 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

xbu – ./

xbu-franqsanz.vercel.app
xbu.vercel.app
xbu-git-main-franqsanz.vercel.app

Please sign in to comment.