- {HOSTED_VS_SELF.map(({ icon: Icon, label, hosted, self }) => (
+ {HOSTED_VS_SELF.map(({ label, hosted, self }) => (
diff --git a/dashboard/src/components/ResultCard.jsx b/dashboard/src/components/ResultCard.jsx
index 4f3eea1..23a81e4 100644
--- a/dashboard/src/components/ResultCard.jsx
+++ b/dashboard/src/components/ResultCard.jsx
@@ -271,6 +271,9 @@ export default function ResultCard({ clip, index, jobId, durable, uploadPostKey,
});
}
}
+ // Reset only when the modal opens for a clip; connection changes while
+ // it is open must not wipe the user's selection.
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [showModal, clip]);
const handleAutoEdit = async () => {
diff --git a/dashboard/src/components/SaaShortsTab.jsx b/dashboard/src/components/SaaShortsTab.jsx
index 9026c09..e02b3aa 100644
--- a/dashboard/src/components/SaaShortsTab.jsx
+++ b/dashboard/src/components/SaaShortsTab.jsx
@@ -81,8 +81,6 @@ export default function SaaShortsTab({ geminiApiKey, elevenLabsKey, falKey, uplo
const [actorGallery, setActorGallery] = useState([]);
const [loadingGallery, setLoadingGallery] = useState(false);
const [uploadedActorPreview, setUploadedActorPreview] = useState(null); // {localPreview, serverUrl}
- const [productPhoto, setProductPhoto] = useState(null); // {preview, serverUrl}
- const [productDescription, setProductDescription] = useState('');
// Step 3: Generate
const [generating, setGenerating] = useState(false);
@@ -102,12 +100,14 @@ export default function SaaShortsTab({ geminiApiKey, elevenLabsKey, falKey, uplo
const [copied, setCopied] = useState('');
const [logsExpanded, setLogsExpanded] = useState(true);
- // Pre-fill from cache on mount
+ // Pre-fill from cache on mount (once: later cache changes must not
+ // overwrite what the user typed).
useEffect(() => {
if (fromCache && scripts.length > 0 && !actorDescription) {
setActorDescription(scripts[0].actor_description || '');
setEditedNarration(scripts[0].full_narration || '');
}
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
// Fetch actor gallery on mount
@@ -125,6 +125,7 @@ export default function SaaShortsTab({ geminiApiKey, elevenLabsKey, falKey, uplo
if (elevenLabsKey) {
fetchVoices();
}
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [elevenLabsKey]);
// Reset selected voice when actor gender changes
@@ -142,6 +143,8 @@ export default function SaaShortsTab({ geminiApiKey, elevenLabsKey, falKey, uplo
} else {
setSelectedVoice(genderDefaults[`${language}-${actorGender}`] || genderDefaults['en-female']);
}
+ // Re-pick only when the gender/language choice changes, not on every voices refresh.
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [actorGender, language]);
// Poll generation status
diff --git a/dashboard/src/components/TopUpModal.jsx b/dashboard/src/components/TopUpModal.jsx
index f9dd32d..511e106 100644
--- a/dashboard/src/components/TopUpModal.jsx
+++ b/dashboard/src/components/TopUpModal.jsx
@@ -55,6 +55,8 @@ export default function TopUpModal({ onClose, required, remaining, context = 'wa
setTopups(d.topups || []);
})
.catch(() => {});
+ // Plans are fetched once per open; the props only shape the copy.
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
// Instrumented in three steps on purpose. Between 25-jul and 1-ago the modals
diff --git a/dashboard/src/components/WatermarkModal.jsx b/dashboard/src/components/WatermarkModal.jsx
index a4ca81c..07fe415 100644
--- a/dashboard/src/components/WatermarkModal.jsx
+++ b/dashboard/src/components/WatermarkModal.jsx
@@ -3,6 +3,7 @@ import Modal from './ui/Modal';
const DISMISS_KEY = 'os_watermark_notice_dismissed';
+// eslint-disable-next-line react-refresh/only-export-components
export function watermarkNoticeDismissed() {
try { return localStorage.getItem(DISMISS_KEY) === '1'; } catch { return false; }
}
diff --git a/dashboard/src/contexts/AuthContext.jsx b/dashboard/src/contexts/AuthContext.jsx
index a2287a3..7487efa 100644
--- a/dashboard/src/contexts/AuthContext.jsx
+++ b/dashboard/src/contexts/AuthContext.jsx
@@ -11,6 +11,7 @@ import { track } from '../lib/analytics';
import { report as reportAttribution } from '../lib/attribution';
const AuthContext = createContext(null);
+// eslint-disable-next-line react-refresh/only-export-components
export const useAuth = () => useContext(AuthContext);
export function AuthProvider({ children }) {