refetch baord list when image is starred or unstarred

This commit is contained in:
Mary Hipp 2023-10-03 12:05:07 -04:00 committed by psychedelicious
parent 069d8b5812
commit f4ba7be918

View File

@ -473,6 +473,7 @@ export const imagesApi = api.injectEndpoints({
if (images[0]) { if (images[0]) {
const categories = getCategories(images[0]); const categories = getCategories(images[0]);
const boardId = images[0].board_id; const boardId = images[0].board_id;
return [ return [
{ {
type: 'ImageList', type: 'ImageList',
@ -481,6 +482,10 @@ export const imagesApi = api.injectEndpoints({
categories, categories,
}), }),
}, },
{
type: 'Board',
id: boardId,
},
]; ];
} }
return []; return [];
@ -595,6 +600,10 @@ export const imagesApi = api.injectEndpoints({
categories, categories,
}), }),
}, },
{
type: 'Board',
id: boardId,
},
]; ];
} }
return []; return [];