22
33import React from 'react'
44import Link from 'next/link'
5- import { ArrowRight , Dna , Pill , Users , Activity , Info , Scroll } from 'lucide-react'
5+ import { ArrowRight , Pill , Users , Activity , Info , Scroll } from 'lucide-react'
66import { motion } from 'framer-motion'
77import CostSavingsTable from './CostSavingsTable'
8- import PredictorSearchAutocomplete from './PredictorSearchAutocomplete'
98import { GlobalVariable } from '@/types/models/all'
10- import OutcomeSearchAutocomplete from './OutcomeSearchAutocomplete'
119import AdvancedTrialSearch from './AdvancedTrialSearch'
1210import { Robot } from '@phosphor-icons/react'
1311import { FeatureBox } from './FeatureBox'
@@ -16,6 +14,7 @@ import CitizenScienceSection from './CitizenScienceSection'
1614import { useRouter } from 'next/navigation'
1715import { useState } from 'react'
1816import { getSafeUrlWithToken } from '../dfdaActions'
17+ import VariableSearchAutocomplete from "@/app/dfda/components/VariableSearchAutocomplete" ;
1918
2019const SquigglyPattern = ( ) => (
2120 < svg className = "absolute inset-0 h-full w-full" xmlns = "http://www.w3.org/2000/svg" >
@@ -26,7 +25,7 @@ const SquigglyPattern = () => (
2625 </ svg >
2726)
2827
29- export default function HomePage ( ) {
28+ export default function DFDAHomePage ( ) {
3029 const router = useRouter ( )
3130 const [ isLoading , setIsLoading ] = useState ( false )
3231
@@ -168,16 +167,52 @@ export default function HomePage() {
168167
169168 < main className = "space-y-12" >
170169 < section className = "relative overflow-visible rounded-xl border-4 border-black bg-gradient-to-r from-pink-400 to-purple-400 p-6 shadow-[8px_8px_0px_0px_rgba(0,0,0,1)]" >
171- < h2 className = "mb-6 text-4xl font-black uppercase" > See Effects of Foods🍟 or Drugs💊 </ h2 >
170+ < h2 className = "mb-6 text-4xl font-black uppercase" > See Effects of Foods🍟</ h2 >
172171 < div className = "flex flex-col gap-4 md:flex-row" >
173- < PredictorSearchAutocomplete onVariableSelect = { onVariableSelect } />
172+ < VariableSearchAutocomplete
173+ onVariableSelect = { onVariableSelect }
174+ searchParams = { {
175+ sort : '-numberOfCorrelationsAsCause' ,
176+ isPublic : '1' ,
177+ variableCategoryName : 'Foods' ,
178+ limit : '50'
179+ } }
180+ placeholder = "Enter Foods🍟"
181+ />
182+
183+ </ div >
184+ </ section >
185+
186+ < section className = "relative overflow-visible rounded-xl border-4 border-black bg-gradient-to-r from-pink-400 to-purple-400 p-6 shadow-[8px_8px_0px_0px_rgba(0,0,0,1)]" >
187+ < h2 className = "mb-6 text-4xl font-black uppercase" > See Effects of Treatments💊</ h2 >
188+ < div className = "flex flex-col gap-4 md:flex-row" >
189+ < VariableSearchAutocomplete
190+ onVariableSelect = { onVariableSelect }
191+ searchParams = { {
192+ sort : '-numberOfCorrelationsAsCause' ,
193+ isPublic : '1' ,
194+ variableCategoryName : 'Treatments' ,
195+ limit : '50'
196+ } }
197+ placeholder = "Enter treatment 💊"
198+ />
199+
174200 </ div >
175201 </ section >
176202
177203 < section className = "relative overflow-visible rounded-xl border-4 border-black bg-gradient-to-r from-pink-400 to-purple-400 p-6 shadow-[8px_8px_0px_0px_rgba(0,0,0,1)]" >
178204 < h2 className = "mb-6 text-4xl font-black uppercase" > See Most Effective Treatments for your Condition</ h2 >
179205 < div className = "flex flex-col gap-4 md:flex-row" >
180- < OutcomeSearchAutocomplete onVariableSelect = { onVariableSelect } />
206+ < VariableSearchAutocomplete
207+ onVariableSelect = { onVariableSelect }
208+ searchParams = { {
209+ sort : '-numberOfCorrelationsAsCause' ,
210+ isPublic : '1' ,
211+ variableCategoryName : 'Symptoms' ,
212+ limit : '50'
213+ } }
214+ placeholder = "Enter treatment 💊"
215+ />
181216 </ div >
182217 </ section >
183218
0 commit comments