@@ -24,7 +24,7 @@ const HeroSection = ({ blogData }: { blogData: BlogPost[] }) => {
2424 Learn how to design, develop, launch, and grow digital products through practical knowledge and proven
2525 frameworks.
2626 </ p >
27- < form className = 'gap-3 py-1 max-sm:space-y-2 sm:flex sm:flex-row md:w-sm' >
27+ < form className = 'gap-3 py-1 max-sm:w-full max-sm: space-y-2 sm:flex sm:flex-row md:w-sm' >
2828 < Input type = 'email' placeholder = 'Your email' className = 'bg-background h-10 flex-1 text-base' />
2929 < Button size = 'lg' className = 'text-base max-sm:w-full' asChild type = 'submit' >
3030 < a href = '#' > Subscribe</ a >
@@ -34,18 +34,18 @@ const HeroSection = ({ blogData }: { blogData: BlogPost[] }) => {
3434
3535 < div className = 'grid grid-cols-1 gap-6 sm:grid-cols-2' >
3636 { featuredPosts . map ( ( item , index ) => (
37- < a href = { `/blog/ ${ item . slug } ` } key = { `${ item . author } -${ index } ` } className = 'group' >
38- < Card className = 'cursor-pointer py-0 shadow-none' >
37+ < div key = { `${ item . author } -${ index } ` } className = 'group' >
38+ < Card className = 'cursor-default py-0 shadow-none' >
3939 < CardContent className = 'grid grid-cols-1 px-0 xl:grid-cols-2' >
4040 < div className = 'p-6' >
41- < div className = 'h-59.5 w-full overflow-hidden rounded-lg' >
41+ < a href = { `/blog/ ${ item . slug } ` } className = 'block h-59.5 w-full overflow-hidden rounded-lg' >
4242 < img
4343 src = { item . imageUrl }
4444 alt = { item . imageAlt }
4545 className = 'w-full object-cover transition-transform duration-300 group-hover:scale-105'
4646 loading = 'lazy'
4747 />
48- </ div >
48+ </ a >
4949 </ div >
5050 < div className = 'flex flex-col justify-center gap-3 p-6' >
5151 < div className = 'flex items-center gap-1.5 py-1' >
@@ -58,27 +58,33 @@ const HeroSection = ({ blogData }: { blogData: BlogPost[] }) => {
5858 onClick = { e => {
5959 e . preventDefault ( )
6060 e . stopPropagation ( )
61+ window . location . href = `/#category-${ item . category } `
6162 } }
6263 >
6364 { item . category }
6465 </ Badge >
6566 </ div >
66- < h3 className = 'text-xl font-medium' > { item . title } </ h3 >
67+ < a href = { `/blog/${ item . slug } ` } >
68+ < h3 className = 'text-xl font-medium' > { item . title } </ h3 >
69+ </ a >
6770
6871 < p className = 'text-muted-foreground' > { item . description } </ p >
6972 < div className = 'flex w-full items-center justify-between gap-1 py-1' >
7073 < span className = 'cursor-pointer text-sm font-medium' > { item . author } </ span >
7174 < Button
7275 size = 'icon'
7376 className = 'group-hover:bg-primary! bg-background text-foreground hover:bg-primary! hover:text-primary-foreground group-hover:text-primary-foreground border group-hover:border-transparent hover:border-transparent'
77+ asChild
7478 >
75- < ArrowUpRightIcon />
79+ < a href = { `/blog/${ item . slug } ` } >
80+ < ArrowUpRightIcon />
81+ </ a >
7682 </ Button >
7783 </ div >
7884 </ div >
7985 </ CardContent >
8086 </ Card >
81- </ a >
87+ </ div >
8288 ) ) }
8389 </ div >
8490 </ div >
0 commit comments