diff --git a/src/components/Pages/TopicPage.tsx b/src/components/Pages/TopicPage.tsx index f974f20e..198be0a0 100644 --- a/src/components/Pages/TopicPage.tsx +++ b/src/components/Pages/TopicPage.tsx @@ -15,7 +15,7 @@ export const TopicPage = (props: PageProps) => { const page = getPage() - if (page.route !== 'author') { + if (page.route !== 'topic') { throw new Error('ts guard') } diff --git a/src/components/Views/AllAuthors.tsx b/src/components/Views/AllAuthors.tsx index 1aa61b56..3273b7b3 100644 --- a/src/components/Views/AllAuthors.tsx +++ b/src/components/Views/AllAuthors.tsx @@ -35,7 +35,7 @@ export const AllAuthorsView = (props: Props) => { const byLetter = createMemo<{ [letter: string]: Author[] }>(() => { return sortedAuthors().reduce((acc, author) => { - const letter = author.name[0] + const letter = author.name[0].toUpperCase() if (!acc[letter]) { acc[letter] = [] } diff --git a/src/components/Views/AllTopics.tsx b/src/components/Views/AllTopics.tsx index ae26f45d..15b40959 100644 --- a/src/components/Views/AllTopics.tsx +++ b/src/components/Views/AllTopics.tsx @@ -35,7 +35,7 @@ export const AllTopicsView = (props: AllTopicsViewProps) => { const byLetter = createMemo<{ [letter: string]: Topic[] }>(() => { return sortedTopics().reduce((acc, topic) => { - const letter = topic.title[0] + const letter = topic.title[0].toUpperCase() if (!acc[letter]) { acc[letter] = [] }