File tree Expand file tree Collapse file tree 5 files changed +37
-9
lines changed
Expand file tree Collapse file tree 5 files changed +37
-9
lines changed Original file line number Diff line number Diff line change 1+ import { FC } from 'react'
2+ import { Search } from '../../components/Search'
3+ import { useTranslation } from 'react-i18next'
4+ import { useSearchQueryNetworkParam } from '../../hooks/useSearchQueryNetworkParam'
5+ import { useIsApiReachable } from '../../components/OfflineBanner/hook'
6+
7+ import SearchBg from './images/search-bg.png'
8+ import { Typography } from '@oasisprotocol/ui-library/src/components/typography'
9+
10+ export const HomeSearch : FC = ( ) => {
11+ const { t } = useTranslation ( )
12+ const { network } = useSearchQueryNetworkParam ( )
13+ const isApiReachable = useIsApiReachable ( network ) . reachable
14+
15+ return (
16+ < div
17+ id = "search"
18+ style = { { backgroundImage : `url(${ SearchBg } )` } }
19+ className = "py-12 px-8 md:p-24 bg-[#DFDEF5] bg-cover bg-center bg-no-repeat rounded-md"
20+ >
21+ < Typography
22+ variant = "h2"
23+ className = "text-center justify-start text-foreground text-2xl md:text-3xl font-semibold leading-8 mb-4 md:mb-8"
24+ >
25+ { t ( 'home.search' ) }
26+ </ Typography >
27+
28+ < Search disabled = { ! isApiReachable } />
29+ </ div >
30+ )
31+ }
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ export const RoflAppsCard: FC = () => {
77 const { t } = useTranslation ( )
88
99 return (
10- < Card variant = "layout" >
10+ < Card variant = "layout" className = "md:mb-0" >
1111 < CardHeader >
1212 < CardTitle > { t ( 'rofl.listTitle' ) } </ CardTitle >
1313 </ CardHeader >
Original file line number Diff line number Diff line change 11import { FC } from 'react'
2- import { Search } from '../../components/Search'
32import { Footer } from '../../components/PageLayout/Footer'
4- import { useTranslation } from 'react-i18next'
53import { BuildBanner } from '../../components/BuildBanner'
64import { useSearchQueryNetworkParam } from '../../hooks/useSearchQueryNetworkParam'
75import { NetworkOfflineBanner } from '../../components/OfflineBanner'
8- import { useIsApiReachable } from '../../components/OfflineBanner/hook'
96import { RoflAppsCard } from './RoflAppsCard'
107import { FooterBanner } from './FooterBanner'
8+ import { HomeSearch } from './HomeSearch'
119
1210export const HomePage : FC = ( ) => {
13- const { t } = useTranslation ( )
1411 const { network } = useSearchQueryNetworkParam ( )
15- const isApiReachable = useIsApiReachable ( network ) . reachable
1612
1713 return (
1814 < >
1915 < BuildBanner />
2016 < NetworkOfflineBanner wantedNetwork = { network } />
21- < div className = "px -6" >
22- < Search disabled = { ! isApiReachable } />
17+ < div className = "flex flex-col px-6 gap -6" >
18+ < HomeSearch />
2319 < RoflAppsCard />
2420 < FooterBanner />
2521 </ div >
Original file line number Diff line number Diff line change 675675 "onchainTrust" : " Onchain Trust." ,
676676 "getStarted" : " Get started with ROFL" ,
677677 "description" : " Build trustless apps with ROFL. Start quickly with templates. Manage everything from one interface."
678- }
678+ },
679+ "search" : " Search across all our networks"
679680 },
680681 "paratimes" : {
681682 "activeNodes" : " {{nodes}} active" ,
You can’t perform that action at this time.
0 commit comments