use loading full screen comp
This commit is contained in:
parent
d1207f0541
commit
7e337cd7fa
@ -11,6 +11,7 @@ import { Label } from '@/components/ui/label'
|
||||
import { Textarea } from '@/components/ui/textarea'
|
||||
import { Avatar } from '@/components/ui/avatar'
|
||||
import { LoadingSpinner, LoadingOverlay } from '@/components/ui/loading-spinner'
|
||||
import { FullScreenLoading } from '@/components/ui/full-screen-loading'
|
||||
import { AvatarSkeleton, FormFieldSkeleton, TextAreaSkeleton } from '@/components/ui/skeleton'
|
||||
import { Camera, Save, Eye, EyeOff, Globe } from 'lucide-react'
|
||||
|
||||
@ -234,11 +235,7 @@ export default function ProfilePage() {
|
||||
}
|
||||
|
||||
if (loading) {
|
||||
return (
|
||||
<div className="min-h-screen flex items-center justify-center">
|
||||
<div className="animate-spin rounded-full h-8 w-8 border-b-2 border-primary"></div>
|
||||
</div>
|
||||
)
|
||||
return <FullScreenLoading isVisible={true} message={t('loadingStudio')} />
|
||||
}
|
||||
|
||||
if (!user) {
|
||||
|
@ -316,14 +316,7 @@ export default function PromptPage({ params }: PromptPageProps) {
|
||||
}
|
||||
|
||||
if (loading || isLoading) {
|
||||
return (
|
||||
<div className="min-h-screen flex items-center justify-center">
|
||||
<div className="text-center">
|
||||
<LoadingSpinner size="lg" />
|
||||
<p className="mt-4 text-muted-foreground">{t('loadingStudio')}</p>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
return <FullScreenLoading isVisible={true} message={t('loadingStudio')} />
|
||||
}
|
||||
|
||||
if (!user || !prompt) {
|
||||
|
@ -10,6 +10,7 @@ import { Input } from '@/components/ui/input'
|
||||
import { Label } from '@/components/ui/label'
|
||||
import { Textarea } from '@/components/ui/textarea'
|
||||
import { LoadingSpinner } from '@/components/ui/loading-spinner'
|
||||
import { FullScreenLoading } from '@/components/ui/full-screen-loading'
|
||||
import {
|
||||
ArrowLeft,
|
||||
Save,
|
||||
@ -107,14 +108,7 @@ export default function NewPromptPage() {
|
||||
}
|
||||
|
||||
if (loading) {
|
||||
return (
|
||||
<div className="min-h-screen flex items-center justify-center">
|
||||
<div className="text-center">
|
||||
<LoadingSpinner size="lg" />
|
||||
<p className="mt-4 text-muted-foreground">{t('loadingStudio')}</p>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
return <FullScreenLoading isVisible={true} message={t('loadingStudio')} />
|
||||
}
|
||||
|
||||
if (!user) {
|
||||
|
@ -8,6 +8,7 @@ import { Header } from '@/components/layout/Header'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import { Input } from '@/components/ui/input'
|
||||
import { LoadingSpinner } from '@/components/ui/loading-spinner'
|
||||
import { FullScreenLoading } from '@/components/ui/full-screen-loading'
|
||||
import { EditPromptModal } from '@/components/studio/EditPromptModal'
|
||||
import { PromptDetailModal } from '@/components/studio/PromptDetailModal'
|
||||
import {
|
||||
@ -202,16 +203,7 @@ export default function StudioPage() {
|
||||
const currentPrompts = filteredPrompts
|
||||
|
||||
if (loading || isLoading) {
|
||||
return (
|
||||
<div className="min-h-screen flex items-center justify-center">
|
||||
<div className="text-center">
|
||||
<div className="flex justify-center mb-4">
|
||||
<LoadingSpinner size="lg" />
|
||||
</div>
|
||||
<p className="text-muted-foreground">{t('loadingStudio')}</p>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
return <FullScreenLoading isVisible={true} message={t('loadingStudio')} />
|
||||
}
|
||||
|
||||
if (!user) {
|
||||
|
Loading…
Reference in New Issue
Block a user