diff --git a/src/corpus/ui/Corpus.tsx b/src/corpus/ui/Corpus.tsx index 76ca969de..e1b4e4acf 100644 --- a/src/corpus/ui/Corpus.tsx +++ b/src/corpus/ui/Corpus.tsx @@ -72,12 +72,12 @@ function Texts({ export function genreFromAbbr( abbr: string -): 'Literature' | 'Divination' | 'Medicine' { +): 'Literature' | 'Divination' | 'Medicine' | 'Magic' { const genre = genres.filter(({ genre }) => genre === abbr)[0] if (!genre) { throw new Error(`Genre Abbreviation '${abbr}' has to be one of L, D, Med.`) } - return genre.name as 'Literature' | 'Divination' | 'Medicine' + return genre.name as 'Literature' | 'Divination' | 'Medicine' | 'Magic' } export const genres: readonly { @@ -110,6 +110,11 @@ export const genres: readonly { name: 'Medicine', categories: ['', 'I. Nineveh Medical Encyclopaedia'], }, + { + genre: 'Mag', + name: 'Magic', + categories: ['', 'I. Anti-witchcraft'], + }, ] function Corpus({ diff --git a/src/corpus/ui/__snapshots__/Corpus.integration.test.ts.snap b/src/corpus/ui/__snapshots__/Corpus.integration.test.ts.snap index 2228923e3..15b9f4f62 100644 --- a/src/corpus/ui/__snapshots__/Corpus.integration.test.ts.snap +++ b/src/corpus/ui/__snapshots__/Corpus.integration.test.ts.snap @@ -237,6 +237,17 @@ exports[`With session 1`] = ` > Medicine + + Magic +