fix: move loading check after useEffect to prevent infinite loading
This commit is contained in:
parent
1b35b8dd70
commit
5ce0980090
1 changed files with 4 additions and 6 deletions
|
|
@ -128,12 +128,6 @@ export default function SettingsPage() {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (loading) {
|
||||
return <div className="flex justify-center p-8"><Loader2 className="animate-spin" /></div>
|
||||
}
|
||||
|
||||
// Predefined schemas for known services (Copied from CredentialsPage)
|
||||
const schemas: Record<string, { label: string, fields: { key: string, label: string, type?: string }[] }> = {
|
||||
stripe: {
|
||||
|
|
@ -413,6 +407,10 @@ export default function SettingsPage() {
|
|||
init()
|
||||
}, [])
|
||||
|
||||
if (loading) {
|
||||
return <div className="flex justify-center p-8"><Loader2 className="animate-spin" /></div>
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
{/* Header ... */}
|
||||
|
|
|
|||
Loading…
Reference in a new issue