Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Clear the Empty spaces in /chapter route #1369

Merged
merged 16 commits into from Aug 23, 2022
Merged
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 12 additions & 8 deletions client/src/modules/chapters/pages/chaptersPage.tsx
@@ -1,8 +1,8 @@
import { Heading, VStack, Stack } from '@chakra-ui/layout';
import { NextPage } from 'next';
import React from 'react';
import { Grid, GridItem } from '@chakra-ui/react';

import { ChapterCard } from 'components/ChapterCard';
Sboonny marked this conversation as resolved.
Show resolved Hide resolved
import { useChaptersQuery } from 'generated/graphql';

export const ChaptersPage: NextPage = () => {
Expand All @@ -20,16 +20,20 @@ export const ChaptersPage: NextPage = () => {
</div>
);
}

return (
<VStack>
<Stack w={['90%', '90%', '60%']} maxW="600px" spacing={3} mt={10} mb={5}>
<Heading>Chapters: </Heading>
{data.chapters.map((chapter) => (
<Heading size="md" key={chapter.id}>
<ChapterCard key={chapter.id} chapter={chapter} />
</Heading>
))}
<Heading>Chapters: </Heading>
<Grid mt="5%" templateColumns="repeat(2, 1fr)" columnGap="5%">
{data.chapters.map((chapter) => (
<GridItem>
<Heading size="md" key={chapter.id}>
<ChapterCard key={chapter.id} chapter={chapter} />
</Heading>
</GridItem>
))}
</Grid>
</Stack>
</Stack>
</VStack>
);
Expand Down