Skip to content

Commit f2b146e

Browse files
author
Faxbot Agent
committed
fix(ui): move hydration-banner useEffect inside AppContent; remove module-scope hook usage (prevents dispatcher null)
1 parent 3a5e49f commit f2b146e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

api/admin_ui/src/App.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,12 @@ function AppContent() {
112112
const [mobileOpen, setMobileOpen] = useState(false);
113113
const [providerWizardOpen, setProviderWizardOpen] = useState(false);
114114

115+
// Hide hydration banner once React mounts successfully
116+
useEffect(() => {
117+
const el = document.getElementById('hydration-banner');
118+
if (el) el.style.display = 'none';
119+
}, []);
120+
115121
const handleLogin = async (key: string) => {
116122
try {
117123
const testClient = new AdminAPIClient(key);
@@ -876,10 +882,4 @@ function App() {
876882
}
877883

878884
export default App;
879-
// Hide hydration banner on successful React mount
880-
useEffect(() => {
881-
const el = document.getElementById('hydration-banner');
882-
if (el) {
883-
el.style.display = 'none';
884-
}
885-
}, []);
885+

0 commit comments

Comments
 (0)