Cleanup last commit

This commit is contained in:
2025-01-10 14:17:35 -05:00
parent a1f4e57394
commit 619f4058c6

View File

@@ -44,15 +44,6 @@ export function Settings() {
});
// Clean up function to reset state
const cleanupState = () => {
if (eventSource) {
eventSource.close();
setEventSource(null);
}
setIsUpdating(false);
setIsImporting(false);
setProgress(null);
};
const handleCancel = async () => {
// Just clean up everything immediately
@@ -91,7 +82,7 @@ export function Settings() {
// Add event listeners for all SSE events
source.onopen = () => {};
source.onerror = (error) => {
source.onerror = () => {
if (source.readyState === EventSource.CLOSED) {
source.close();
setEventSource(null);
@@ -210,7 +201,7 @@ export function Settings() {
// Add event listeners for all SSE events
source.onopen = () => {};
source.onerror = (error) => {
source.onerror = () => {
if (source.readyState === EventSource.CLOSED) {
source.close();
setEventSource(null);