This commit is contained in:
Nikhil Nawgiri 2024-11-02 18:41:12 +01:00
parent 41f12db8f0
commit 843ef1395d

View file

@ -1,4 +1,5 @@
import { useEffect, useState } from "react";
import { getItemStatusInLibrary } from "../../helper/internalApiHelper";
const LIBRARY_STATUS_AVAILABLE = "available";
const LIBRARY_STATUS_REQUESTED= "requested";
@ -25,6 +26,7 @@ const ItemStatusInLibrary = ({
useEffect(() => {
// begin fetching
setIsFetching(true);
getItemStatusInLibrary(imdbId);
});
return (
@ -37,5 +39,6 @@ const ItemStatusInLibrary = ({
&& statusIcons[libraryState]}
</div>
);
}
export default ItemStatusInLibrary