Skip to content

Commit

Permalink
seperated out a the loading component
Browse files Browse the repository at this point in the history
  • Loading branch information
mazwrld committed Apr 28, 2024
1 parent 139052d commit f2fe852
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
13 changes: 1 addition & 12 deletions app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
import { Suspense } from 'react'
import { SignedIn, SignedOut } from '@clerk/nextjs'

import Loading from '@/components/ui/loading'
import Images from '@/components/images'

export const dynamic = 'force-dynamic'

function Loading() {
return (
<div className="flex h-svh items-center justify-center overflow-hidden">
<div className="relative rounded-lg p-5 shadow-lg">
<div className="absolute left-0 top-0 flex h-svh w-svw items-center justify-center">
<div className="h-20 w-20 animate-spin rounded-full border-4 border-white"></div>
</div>
</div>
</div>
)
}

export default function HomePage() {
return (
<>
Expand Down
11 changes: 11 additions & 0 deletions components/ui/loading.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export default function Loading() {
return (
<div className="flex h-svh items-center justify-center overflow-hidden">
<div className="relative rounded-lg p-5 shadow-lg">
<div className="absolute left-0 top-0 flex h-svh w-svw items-center justify-center">
<div className="h-20 w-20 animate-spin rounded-full border-4 border-white"></div>
</div>
</div>
</div>
)
}

0 comments on commit f2fe852

Please sign in to comment.