File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
client/src/components/Navbar Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,8 @@ export function Navbar() {
65
65
}
66
66
} ;
67
67
68
+
69
+
68
70
const handleGithubClick = ( event : React . MouseEvent < HTMLButtonElement > ) => {
69
71
event . preventDefault ( ) ;
70
72
window . open ( "https://github.com/devhub-ai/devhub" , "_blank" ) ;
@@ -82,9 +84,21 @@ export function Navbar() {
82
84
/>
83
85
</ div >
84
86
< div className = "flex gap-4 md:hidden" >
85
- < button onClick = { ( e ) => handleClick ( e , { to : "#features" } ) } > < IconTerminal2 className = "size-10" /> </ button >
86
- < button onClick = { ( e ) => handleGithubClick ( e ) } > < IconBrandGithub className = "size-10" /> </ button >
87
+ < button onClick = { ( e ) => {
88
+ e . preventDefault ( ) ;
89
+ const targetElement = document . querySelector ( "#features" ) ;
90
+ if ( targetElement ) {
91
+ targetElement . scrollIntoView ( { behavior : "smooth" } ) ;
92
+ }
93
+ } } >
94
+ < IconTerminal2 className = "size-10" />
95
+ </ button >
96
+ < button onClick = { handleGithubClick } >
97
+ < IconBrandGithub className = "size-10" />
98
+ </ button >
87
99
</ div >
100
+
101
+
88
102
< div className = "px-4" >
89
103
< ModeToggle />
90
104
</ div >
You can’t perform that action at this time.
0 commit comments