@@ -14,7 +14,7 @@ import ContentBlocks from "./ContentBlocks";
1414import ArrowDown from "./icons/ArrowDown" ;
1515import FilterIcon from "./icons/FilterIcon" ;
1616import Spinner from "./icons/Spinner" ;
17- import Searching from "./Searching " ;
17+ import CoachSearch from "./CoachSearch " ;
1818import CoachCard from "./CoachCard" ;
1919import ContentfulRichText from "./ContentfulRichText" ;
2020import type { EmailTemplate } from "~/utils/contentful" ;
@@ -53,6 +53,7 @@ export default function SpeakingTimeContent({
5353 const submit = useSubmit ( ) ;
5454 const formRef = useRef < HTMLFormElement > ( null ) ;
5555 const { t } = useTranslation ( "searchingCoach" ) ;
56+ const [ isActive , setIsActive ] = useState ( false ) ;
5657
5758 const handleChange = ( ) => {
5859 if ( formRef ) {
@@ -61,7 +62,7 @@ export default function SpeakingTimeContent({
6162 } ;
6263 const state = useNavigation ( ) ;
6364
64- const [ isActive , setIsActive ] = useState ( false ) ;
65+
6566 // sort tags to ensure the "quick response" one is always the first in the array
6667 tags . unshift (
6768 tags . splice (
@@ -77,8 +78,14 @@ export default function SpeakingTimeContent({
7778 return (
7879 < div >
7980 < ContentBlocks content = { page . fields . content } locale = { locale } />
80- < Searching />
81- < details open = { true } className = "mx-auto max-w-7xl py-8 px-4" >
81+ < Form
82+ onChange = { handleChange }
83+ ref = { formRef }
84+ method = "get"
85+ id = "filter-form"
86+ className = ""
87+ >
88+ < details open = { false } className = "mx-auto max-w-7xl py-8 px-4" >
8289 < summary
8390 className = "inline-flex cursor-pointer items-center hover:text-vsp-500"
8491 onClick = { ( ) => setIsActive ( ! isActive ) }
@@ -96,13 +103,7 @@ export default function SpeakingTimeContent({
96103 </ div >
97104 </ summary >
98105
99- < Form
100- onChange = { handleChange }
101- ref = { formRef }
102- method = "get"
103- id = "filter-form"
104- className = "flex flex-col gap-2"
105- >
106+
106107 < fieldset className = "mt-8" >
107108 < legend className = "mb-4 inline-block text-xl" >
108109 { t ( "filter.language" ) }
@@ -180,11 +181,14 @@ export default function SpeakingTimeContent({
180181 </ button >
181182 </ noscript >
182183 </ div >
183- </ Form >
184184 </ details >
185+ < CoachSearch />
186+ </ Form >
187+
185188 < div className = "text-m mx-auto max-w-7xl py-4 px-4 font-semibold text-slate-700" >
186189 { coachesAmount ? `${ coachesAmount } ${ t ( "result" ) } ` : t ( "noResult" ) }
187190 </ div >
191+
188192 < div className = "relative" >
189193 { state . state === "loading" && (
190194 < div className = "absolute inset-0 z-50 flex items-start justify-center bg-white bg-opacity-50" >
0 commit comments