@@ -6,10 +6,11 @@ import Results from "./Results";
66import { evaluateScreener } from "../../../api/screener" ;
77
88import { PreviewFormData , ScreenerResult } from "./types" ;
9-
9+ import Tooltip from "@/components/shared/Tooltip" ;
1010
1111const Preview = ( { project, formSchema } ) => {
12- const [ lastInputDataSent , setLastInputDataSent ] = createSignal < PreviewFormData > ( { } ) ;
12+ const [ lastInputDataSent , setLastInputDataSent ] =
13+ createSignal < PreviewFormData > ( { } ) ;
1314 const [ results , setResults ] = createSignal < ScreenerResult > ( ) ;
1415 const [ resultsLoading , setResultsLoading ] = createSignal ( false ) ;
1516
@@ -24,7 +25,7 @@ const Preview = ({ project, formSchema }) => {
2425 schemaVersion : 18 ,
2526 type : "default" ,
2627 } ;
27- }
28+ } ;
2829
2930 const handleSubmitForm = async ( data : PreviewFormData ) => {
3031 setLastInputDataSent ( data ) ;
@@ -39,13 +40,34 @@ const Preview = ({ project, formSchema }) => {
3940 < div >
4041 < div class = "m-4 p-4 border-2 border-gray-200 rounded" >
4142 < div class = "text-lg text-gray-800 text-md font-bold" > Form</ div >
42- < FormRenderer schema = { schema } submitForm = { handleSubmitForm } />
43+ < FormRenderer schema = { schema } submitForm = { handleSubmitForm } />
4344 </ div >
4445 < div class = "m-4 p-4 border-2 border-gray-200 rounded" >
45- < div class = "text-lg text-gray-800 text-md font-bold" > Results</ div >
46- < Results inputData = { lastInputDataSent } results = { results } resultsLoading = { resultsLoading } />
46+ < div class = "flex flex-row gap-2 items-baseline" >
47+ < div class = "text-lg text-gray-800 text-md font-bold" > Results</ div >
48+ < Tooltip >
49+ < p >
50+ The Preview tab provides a live test environment where you can
51+ interact with your screener exactly as an end user would, and
52+ verify that the eligibility logic produces the correct results.
53+ </ p >
54+ < p >
55+ < a
56+ href = "https://bdt-docs.web.app/user-guide/#6-previewing-your-screener"
57+ target = "_blank"
58+ >
59+ Read about previewing your screener in the docs
60+ </ a >
61+ </ p >
62+ </ Tooltip >
63+ </ div >
64+ < Results
65+ inputData = { lastInputDataSent }
66+ results = { results }
67+ resultsLoading = { resultsLoading }
68+ />
4769 </ div >
4870 </ div >
4971 ) ;
50- }
72+ } ;
5173export default Preview ;
0 commit comments