File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
app/[locale]/(user)/components Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 1+ 'use client'
2+
13import Image from 'next/image' ;
4+ import { useRouter } from 'next/navigation' ;
25import { SearchInput , Text } from 'opub-ui' ;
36
47import { cn } from '@/lib/utils' ;
58import Styles from '../page.module.scss' ;
69
710export const Content = ( ) => {
11+ const router = useRouter ( ) ;
12+ const handleSearch = ( value : string ) => {
13+ if ( value ) {
14+ router . push ( `/datasets?query=${ encodeURIComponent ( value ) } ` ) ;
15+ }
16+ } ;
817 return (
918 < main >
1019 < div className = "flex items-center justify-center gap-20 bg-primaryBlue p-8 lg:p-16" >
@@ -27,14 +36,15 @@ export const Content = () => {
2736 < div className = "w-full" >
2837 < SearchInput
2938 className = { cn ( Styles . Search ) }
39+ onSubmit = { handleSearch }
3040 label = { '' }
3141 placeholder = "Search for any data"
3242 name = { '' }
3343 withButton
3444 />
3545 </ div >
3646 </ div >
37- < div className = ' hidden lg:block' >
47+ < div className = " hidden lg:block" >
3848 < Image
3949 src = { '/homepage_illustartion.png' }
4050 width = { 500 }
You can’t perform that action at this time.
0 commit comments