Skip to content

Commit

Permalink
chore: minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Franqsanz committed May 15, 2024
1 parent a2aaed0 commit a3c75fa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/components/MySimpleGrid.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import React from 'react';
import { SimpleGrid, useColorModeValue } from '@chakra-ui/react';

export function MySimpleGrid({ children }: { children: React.ReactNode }) {
interface SimpleGridType {
width?: string;
children: React.ReactNode;
}

export function MySimpleGrid({ width = '8xl', children }: SimpleGridType) {
const colorCard = useColorModeValue('gray.900', 'gray.100');

return (
Expand All @@ -10,7 +15,7 @@ export function MySimpleGrid({ children }: { children: React.ReactNode }) {
as='section'
maxW='full'
minH='100vh'
w='8xl'
w={width}
columns={{ base: 2, md: 3, lg: 4, '2xl': 5 }}
justifyItems='center'
m='auto'
Expand Down
4 changes: 3 additions & 1 deletion src/pages/MostViewed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { MySimpleGrid } from '@components/MySimpleGrid';
import { Card } from '@components/cards/Card';
import { CardType } from '@components/types';
import { useMostViewedBooks } from '@hooks/querys';
import { MySliderCategories } from '@components/MySliderCategories';

export default function MostViewed() {
const { data } = useMostViewedBooks('full');
Expand All @@ -14,7 +15,8 @@ export default function MostViewed() {
<>
<MainHead title='Top 10 Más Vistos | XBuniverse' />
<ContainerTitle title='Top 10 Más Vistos' />
<MySimpleGrid>
<MySliderCategories />
<MySimpleGrid width='6xl'>
{data?.map(
({
id,
Expand Down

0 comments on commit a3c75fa

Please sign in to comment.