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
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -44,7 +44,7 @@ We are using the following tools:
- [Chakra UI](https://chakra-ui.com/) - simple, modular & accessible UI components for React
- Functional Components with [Hooks](https://reactjs.org/docs/hooks-intro.html)
- [Jest](https://jestjs.io/) - for writing unit tests.
- [Cypress](https://www.cypress.io/) - to check if specific actions are possible to preform in certain scenarios.
- [Cypress](https://www.cypress.io/) - to check if specific actions are possible to perform in certain scenarios.

For more information and a guide to working on features, go to the [contributing docs](/CONTRIBUTING.md#adding-a-new-feature).

Expand Down
17 changes: 10 additions & 7 deletions client/src/modules/chapters/pages/chaptersPage.tsx
@@ -1,7 +1,7 @@
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';

Expand All @@ -20,16 +20,19 @@ 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>
))}
<Grid mt="5%" templateColumns="repeat(2, 1fr)" columnGap="5%">
{data.chapters.map((chapter) => (
<GridItem key={chapter.id}>
<Heading size="md">
<ChapterCard chapter={chapter} />
</Heading>
</GridItem>
))}
</Grid>
</Stack>
</VStack>
);
Expand Down