Merge branch 'topics-authors' into dev

This commit is contained in:
Igor Lobanov 2022-10-05 20:11:15 +02:00
commit 814f63e6ee
3 changed files with 3 additions and 3 deletions

View File

@ -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')
}

View File

@ -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] = []
}

View File

@ -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] = []
}