fix favoriting

This commit is contained in:
Georgi Gardev
2023-11-20 12:25:59 +02:00
parent 34fe161759
commit 86ce1c6b7c

View File

@@ -82,10 +82,10 @@ export function createBackgrounds(appSettings: Settings): BackgroundsState {
}
setFavroiteBackgrounds((prev) => {
if (prev.find((background) => background.id === currentRandomBackground()!.id)) {
if (prev.find((background) => background.id === currentBackground()!.id)) {
return prev;
}
return [...prev, currentRandomBackground()!];
return [...prev, currentBackground()!];
});
};