1- 'use client' ;
2-
3- import React , { useState } from 'react' ;
4- import { ListChecks } from 'lucide-react' ;
5- import { AuthModal } from './sections/auth-modal' ;
1+ "use client" ;
62
3+ import React , { useState } from "react" ;
4+ import { ListChecks } from "lucide-react" ;
5+ import { AuthModal } from "./sections/auth-modal" ;
6+ import { useRouter } from "next/navigation" ;
77interface Step {
88 number : number ;
99 title : string ;
@@ -16,9 +16,8 @@ interface HowItWorksProps {
1616}
1717
1818const HowItWorks : React . FC < HowItWorksProps > = ( { steps } ) => {
19-
20- const [ openAuthModal , setOpenAuthModal ] = useState ( false ) ;
21-
19+ const [ openAuthModal , setOpenAuthModal ] = useState ( false ) ;
20+ const router = useRouter ( ) ;
2221
2322 return (
2423 < div className = "dark:bg-black bg-white text-[var(--white-text-color)] py-8" >
@@ -59,7 +58,7 @@ const [openAuthModal, setOpenAuthModal] = useState(false);
5958 className = { `${
6059 step . number === 1 ? "cursor-pointer" : ""
6160 } rounded-lg py-6 px-2 min-h-[80px] flex items-center text-wrap`}
62- onClick = { ( ) => step . number === 1 && setOpenAuthModal ( true ) }
61+ onClick = { ( ) => step . number === 1 && router . push ( "/login" ) }
6362 >
6463 < h3 className = "text-base font-medium dark:text-white text-black" >
6564 { step . title }
@@ -83,4 +82,4 @@ const [openAuthModal, setOpenAuthModal] = useState(false);
8382 ) ;
8483} ;
8584
86- export default HowItWorks ;
85+ export default HowItWorks ;
0 commit comments