From 19b183af106b1542382ee67b78f2790da6647f6b Mon Sep 17 00:00:00 2001 From: Kim Date: Sun, 10 Jan 2021 12:05:16 +0100 Subject: [PATCH 1/7] feat(AF-66): Chapter progress overview --- .prettierrc | 5 ++++ src/components/ChapterCard.tsx | 38 +++++++++++++++++--------- src/pages/Dashboard/ChapterSection.tsx | 26 ++++++------------ 3 files changed, 39 insertions(+), 30 deletions(-) create mode 100644 .prettierrc diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..0db0d99 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,5 @@ +{ + "trailingComma": "all", + "printWidth": 90, + "singleQuote": false +} diff --git a/src/components/ChapterCard.tsx b/src/components/ChapterCard.tsx index 9ae2d45..4fe7657 100644 --- a/src/components/ChapterCard.tsx +++ b/src/components/ChapterCard.tsx @@ -16,13 +16,11 @@ import { } from "queries/__generated__/subscribeChapterById"; interface Props extends WithStyles { - chapter: - | getChapters_chapters - | subscribeChapterById_chapter_subChapters - | subscribeChapterById_chapter; + chapter: getChapters_chapters | subscribeChapterById_chapter_subChapters; + // | subscribeChapterById_chapter; // TODO: typing } -const ChapterCard = ({ classes, chapter }: Props) => { +const ChapterCard: React.FC = ({ classes, chapter }) => { const { t } = useTranslation("chapter"); // Note: MUI links together with react-router-dom and Typescript are a bit tricky due to their dynamic nature @@ -30,19 +28,22 @@ const ChapterCard = ({ classes, chapter }: Props) => { //