11"use client" ;
22import React , { useEffect , useState } from "react" ;
3- import { ChevronLeft , Printer , Sparkles } from "lucide-react" ;
3+ import { ChevronLeft , Sparkles } from "lucide-react" ;
44
55import { Button } from "@/components/ui/button" ;
66
@@ -16,7 +16,7 @@ import { ActionPlanSection } from "@/components/ActionPlanSection";
1616import ResourcesList from "@/components/ResourcesList" ;
1717import { useSearchParams } from "next/navigation" ;
1818import { UploadIntakeTab } from "@/components/UploadIntakeTab" ;
19- import { EmailReferralsButton } from "@/components/EmailReferralsButton " ;
19+ import { ShareButtons } from "@/components/ShareButtons " ;
2020
2121import { Tabs , TabsContent , TabsList , TabsTrigger } from "@/components/ui/tabs" ;
2222import { Upload } from "lucide-react" ;
@@ -345,10 +345,10 @@ export default function Page() {
345345 setUserEmail = { setUserEmail }
346346 />
347347 ) : (
348- < div className = "print:hidden" >
348+ < div className = "print:hidden overflow-x-hidden " >
349349 < PilotFeedbackBanner />
350350 < GoodwillReferralToolHeaderPilot />
351- < div className = "flex flex-col gap-2 m-4 " >
351+ < div className = "max-w-5xl mx-auto px-4 flex flex-col gap-2" >
352352 < Tabs
353353 value = { activeTab }
354354 onValueChange = { setActiveTab }
@@ -413,25 +413,11 @@ export default function Page() {
413413 < ChevronLeft className = "w-4 h-4" />
414414 Return To Search
415415 </ Button >
416- < div className = "flex gap-2" >
417- < Button
418- onClick = { handlePrint }
419- variant = "outline"
420- className = "hover:bg-gray-100 hover:text-gray-900"
421- >
422- < Printer
423- data-testid = "printReferralsButton"
424- className = "w-4 h-4"
425- />
426- Print Referrals
427- </ Button >
428- { resourcesResultId && (
429- < EmailReferralsButton
430- resultId = { resourcesResultId }
431- actionPlanResultId = { actionPlanResultId || undefined }
432- />
433- ) }
434- </ div >
416+ < ShareButtons
417+ onPrint = { handlePrint }
418+ resourcesResultId = { resourcesResultId }
419+ actionPlanResultId = { actionPlanResultId }
420+ />
435421 </ div >
436422 </ div >
437423 ) }
@@ -463,6 +449,21 @@ export default function Page() {
463449 onGenerateActionPlan = { ( ) => void generateActionPlan ( ) }
464450 />
465451 ) }
452+
453+ { readyToPrint && (
454+ < div className = "pt-4 border-t mt-6 pb-8" >
455+ < h4 className = "text-sm font-medium text-gray-700 mb-3 text-right" >
456+ Share
457+ </ h4 >
458+ < ShareButtons
459+ onPrint = { handlePrint }
460+ resourcesResultId = { resourcesResultId }
461+ actionPlanResultId = { actionPlanResultId }
462+ className = "justify-end"
463+ testIdSuffix = "bottom"
464+ />
465+ </ div >
466+ ) }
466467 </ div >
467468 </ div >
468469 ) }
0 commit comments