mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-03-19 07:46:24 +00:00
fix(tv): stop quick connect polling on login page exit
This commit is contained in:
@@ -37,6 +37,7 @@ export const TVLogin: React.FC = () => {
|
||||
login,
|
||||
removeServer,
|
||||
initiateQuickConnect,
|
||||
stopQuickConnectPolling,
|
||||
loginWithSavedCredential,
|
||||
loginWithPassword,
|
||||
} = useJellyfin();
|
||||
@@ -114,6 +115,13 @@ export const TVLogin: React.FC = () => {
|
||||
}
|
||||
}, []);
|
||||
|
||||
// Stop Quick Connect polling when leaving the login page
|
||||
useEffect(() => {
|
||||
return () => {
|
||||
stopQuickConnectPolling();
|
||||
};
|
||||
}, [stopQuickConnectPolling]);
|
||||
|
||||
// Auto login from URL params
|
||||
useEffect(() => {
|
||||
(async () => {
|
||||
|
||||
Reference in New Issue
Block a user