Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion app/loading.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
export default function Loading() {
return null
return (
<div className="min-h-screen bg-gradient-to-br from-green-50 via-yellow-50 to-[#FFC517]/10 flex items-center justify-center">
<div className="text-center">
<img
src="/logo-animated.gif"
alt="Loading..."
className="w-20 h-20 mx-auto mb-4"
/>
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
<p className="text-gray-600">Loading articles...</p>
Comment thread
Atharva0506 marked this conversation as resolved.
Outdated
</div>
</div>
)
}
11 changes: 2 additions & 9 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import BlogCard from "@/components/blog-card"
import Pagination from "@/components/pagination"
import Link from "next/link"
import Footer from "@/components/footer"

import Loading from "@/app/loading"
interface BlogPost {
slug: string
title: string
Expand Down Expand Up @@ -75,14 +75,7 @@ export default function HomePage() {
)

if (loading) {
return (
<div className="min-h-screen bg-gradient-to-br from-green-50 via-yellow-50 to-[#FFC517]/10 flex items-center justify-center">
<div className="text-center">
<div className="animate-spin rounded-full h-12 w-12 border-b-2 border-[#228B22] mx-auto mb-4"></div>
<p className="text-gray-600">Loading articles...</p>
</div>
</div>
)
return <Loading />
}

if (!paginatedData) {
Expand Down
Binary file added public/logo-animated.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.