3
3
import React , { useEffect , useState } from "react" ;
4
4
import SectionTitle from "@/components/SectionTitle" ;
5
5
import ProjectItem from "@/components/projects/ProjectItem" ;
6
+ import { motion } from "framer-motion" ;
6
7
7
8
interface Project {
8
9
id : string ;
@@ -22,6 +23,7 @@ export default function Projects() {
22
23
const [ projects , setProjects ] = useState < Project [ ] > ( [ ] ) ;
23
24
const [ loading , setLoading ] = useState < boolean > ( true ) ;
24
25
const [ error , setError ] = useState < string | null > ( null ) ;
26
+ const [ imageError , setImageError ] = useState < boolean > ( false ) ;
25
27
26
28
useEffect ( ( ) => {
27
29
const fetchProjects = async ( ) => {
@@ -61,8 +63,24 @@ export default function Projects() {
61
63
return (
62
64
< section id = "projects" >
63
65
< div className = "mx-auto max-w-screen-xl px-4 py-16" >
64
- < div className = "flex h-64 items-center justify-center" >
65
- < div className = "text-xl" > Loading projects...</ div >
66
+ < SectionTitle
67
+ title = "Our project"
68
+ description = "Below you will find a list of our projects."
69
+ />
70
+ < div className = "lg:alternate mt-8 space-y-8 lg:mt-12" >
71
+ { [ ...Array ( 3 ) ] . map ( ( _ , index ) => (
72
+ < div key = { index } className = "animate-pulse" >
73
+ < div className = "flex flex-col lg:flex-row lg:items-center lg:space-x-8" >
74
+ < div className = "h-64 w-full rounded-lg bg-gray-200 dark:bg-gray-700 lg:w-1/2" > </ div >
75
+ < div className = "mt-4 w-full lg:mt-0 lg:w-1/2" >
76
+ < div className = "mb-4 h-8 w-3/4 rounded bg-gray-200 dark:bg-gray-700" > </ div >
77
+ < div className = "mb-6 h-4 w-full rounded bg-gray-200 dark:bg-gray-700" > </ div >
78
+ < div className = "h-4 w-full rounded bg-gray-200 dark:bg-gray-700" > </ div >
79
+ < div className = "mt-8 h-10 w-40 rounded bg-gray-200 dark:bg-gray-700" > </ div >
80
+ </ div >
81
+ </ div >
82
+ </ div >
83
+ ) ) }
66
84
</ div >
67
85
</ div >
68
86
</ section >
0 commit comments