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

Commit

Permalink
Clear the Empty spaces in /chapter route (#1369)
Browse files Browse the repository at this point in the history
* design: chapterspage layout

* fix: chapter layout 1244

* fix: chapter layout(change from flex to grid

* Delete .env.development.local

* Delete .env.local

* Update client/src/modules/chapters/pages/chaptersPage.tsx

Co-authored-by: Muhammed Mustafa <muhammed@freecodecamp.org>

* Update client/src/modules/chapters/pages/chaptersPage.tsx

Co-authored-by: Muhammed Mustafa <muhammed@freecodecamp.org>

* Update client/src/modules/chapters/pages/chaptersPage.tsx

Co-authored-by: Muhammed Mustafa <muhammed@freecodecamp.org>

* Update README.md

* fix: chapter layout eslint issue

Co-authored-by: Muhammed Mustafa <muhammed@freecodecamp.org>
  • Loading branch information
hisnameispum and Muhammed Mustafa committed Aug 23, 2022
1 parent 4311ee1 commit 16df48c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
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';
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

0 comments on commit 16df48c

Please sign in to comment.