Do not add mangas to the default category (#433)

The default category is used as a fallback and should never be actually mapped to mangas in the database.
However, when using the update manga category mutation the server still creates this mapping, which then leads to issues with getting mangas for the default category
This commit is contained in:
schroda
2023-10-29 13:15:17 +01:00
committed by GitHub
parent 678df88068
commit 4c6e9a8aa1

View File

@@ -169,7 +169,9 @@ export const MangaDetails: React.FC<IProps> = ({ manga }) => {
const { t } = useTranslation();
const { data: categoriesData, loading: areCategoriesLoading } = requestManager.useGetCategories();
const categories = categoriesData?.categories.nodes ?? [];
const defaultCategoryIds = categories.filter((category) => category.default).map((category) => category.id);
const defaultCategoryIds = categories
.filter((category) => category.default && category.id !== 0)
.map((category) => category.id);
const [updateMangaCategories] = requestManager.useUpdateMangaCategories();
useEffect(() => {