File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import Image from "next/image" ;
22
3- export default function Loading ( ) {
3+ interface LoadingProps {
4+ message ?: string ;
5+ }
6+
7+ export default function Loading ( { message } : LoadingProps = { } ) {
8+ const displayMessage = message ?? "Loading..." ;
9+
410 return (
511 < div className = "min-h-screen bg-gradient-to-br from-green-50 via-yellow-50 to-[#FFC517]/10 flex items-center justify-center" >
612 < div className = "text-center" >
713 < Image
814 src = "/logo-animated.gif"
9- alt = "Loading..."
15+ alt = { displayMessage }
1016 width = { 80 }
1117 height = { 80 }
1218 unoptimized
1319 className = "w-20 h-20 mx-auto mb-4"
1420 />
15- < p className = "text-gray-600" > Loading articles... </ p >
21+ < p className = "text-gray-600" > { displayMessage } </ p >
1622 </ div >
1723 </ div >
18- )
19- }
24+ ) ;
25+ }
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ export default function HomePage() {
7575 )
7676
7777 if ( loading ) {
78- return < Loading />
78+ return < Loading message = "Loading articles..." />
7979 }
8080
8181 if ( ! paginatedData ) {
You can’t perform that action at this time.
0 commit comments