1- import { TypewriterEffect } from '@/components/ui/typewriter-effect ' ;
1+ import { TYPEWRITER_WORDS } from '@/constants ' ;
22import About from '@/components/home/About' ;
33import Name from '@/components/home/Name' ;
4+ import { memo , Suspense } from 'react' ;
5+ import dynamic from 'next/dynamic' ;
46import Image from 'next/image' ;
5- import { memo } from 'react' ;
67
7- const page = ( ) => {
8- const words = [
9- { text : "I" } ,
10- { text : "Build" } ,
11- { text : "Innovative" , } ,
12- { text : "Digital" , } ,
13- { text : "Solutions" , } ,
14- { text : "With" , } ,
15- { text : "Precision" } ,
16- { text : "And" } ,
17- { text : "Passion" } ,
18- { text : "!" } ,
19- ] ;
8+ const TypewriterEffect = dynamic ( ( ) => import ( '@/components/ui/typewriter-effect' ) , {
9+ ssr : false
10+ } ) ;
11+
12+
13+ const HomePage = ( ) => {
2014 return (
2115 < main className = 'flex flex-col pt-12' >
22- { /* Profile image for Seo */ }
23- < div className = 'relative' >
16+ { /* Optimized SEO Image */ }
17+ < div className = 'relative h-0 w-0 ' >
2418 < Image
2519 src = "/assets/profile-image.jpg"
2620 alt = "Muhammed sinan - Mern stack developer"
27- fill
28- className = "object-contain opacity-0"
29- loading = 'lazy'
21+ width = { 1 }
22+ height = { 1 }
23+ priority = { false }
24+ className = "opacity-0"
3025 />
3126 </ div >
3227
33- { /* <Hero /> */ }
3428 < section className = "w-full mx-auto sm:px-16 px-6 pb-10" >
35- < div className = { `pb-7 mx-auto flex flex-row items-start gap-5` } >
36- < div className = "flex flex-col justify-center items-center mt-5 ml-5" >
37- </ div >
29+ < div className = "pb-7 mx-auto flex flex-row items-start gap-5" >
3830 < div >
3931 < header >
4032 < Name />
4133 </ header >
4234 < article >
43- < TypewriterEffect words = { words } />
35+ < Suspense >
36+ < TypewriterEffect words = { TYPEWRITER_WORDS } />
37+ </ Suspense >
4438 </ article >
4539 </ div >
4640 </ div >
4741 </ section >
4842
49- { /* About section */ }
5043 < About />
5144 </ main >
5245 ) ;
5346} ;
5447
55- export default memo ( page ) ;
48+ export default memo ( HomePage ) ;
0 commit comments