Update like and markPlayed buttons

This commit is contained in:
Prayag Prajapati committed 2023-09-06 23:41:11 +05:30
1 parent 2527d429bc
commit b6962b9ab2
9 files changed
+222 -330

No files matched your search

-15
View File
@@ -72,7 +72,6 @@ import { delUser, getUser } from "./utils/storage/user.js";
import axios from "axios";
import { useBackdropStore } from "./utils/store/backdrop.js";
import { useAppLoadingStore } from "./utils/store/appLoading.js";
import { usePlaybackDataLoadStore } from "./utils/store/playback.js";
const jellyfin = new Jellyfin({
@@ -134,24 +133,10 @@ function App() {
const [serverReachable, setServerReachable] = useState(true);
const [setIsAppLoading, setIsAppSuccess, setIsAppError] =
useAppLoadingStore((state) => [
state.setIsLoading,
state.setIsSuccess,
state.setIsError,
]);
const [playbackDataLoading] = usePlaybackDataLoadStore((state) => [
state.isLoading,
]);
useEffect(() => {
const appLoadingStateTimer = setInterval(() => {
setIsAppSuccess(false);
setIsAppError(false);
}, 8000);
return () => clearInterval(appLoadingStateTimer);
}, [setIsAppSuccess, setIsAppError]);
const { enqueueSnackbar } = useSnackbar();
const createApi = async () => {