Skip to content

Commit def39ff

Browse files
authored
Merge pull request wishonia#141 from mikepsinn/main
Cure Acceleration Act/Right to Trial
2 parents 063c31a + ec4e757 commit def39ff

30 files changed

+794
-145
lines changed

app/dfda/cba/page.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from 'react';
22
import { ExtendedMetaAnalysisReport} from "@/lib/agents/fdai/fdaiMetaAnalyzer";
33
import MetaAnalysisReport from "@/app/dfda/components/MetaAnalysisReport";
4+
import BackButton from '../components/BackButton';
45

56
// Example report data
67
const exampleReport: ExtendedMetaAnalysisReport = {
@@ -107,12 +108,12 @@ const exampleReport: ExtendedMetaAnalysisReport = {
107108
]
108109
};
109110

110-
111111
const App = () => {
112112
return (
113-
<div className="container mx-auto p-4">
114-
<MetaAnalysisReport report={exampleReport} />
115-
</div>
113+
<div className="container mx-auto p-4">
114+
<BackButton />
115+
<MetaAnalysisReport report={exampleReport} />
116+
</div>
116117
);
117118
};
118119

app/dfda/components/BackButton.tsx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
'use client'
2+
3+
import { ArrowLeft } from 'lucide-react'
4+
import Link from 'next/link'
5+
6+
interface BackButtonProps {
7+
href?: string;
8+
label?: string;
9+
}
10+
11+
export default function BackButton({ href='/dfda', label = 'Back' }: BackButtonProps) {
12+
if(!href) {href = '/dfda'}
13+
return (
14+
<Link
15+
href={href}
16+
aria-label={label}
17+
className="group mb-6 inline-flex items-center gap-2 rounded-xl border-4 border-black bg-white px-4 py-2 font-bold shadow-[4px_4px_0px_0px_rgba(0,0,0,1)] transition-all hover:translate-x-[2px] hover:translate-y-[2px] hover:shadow-none"
18+
>
19+
<ArrowLeft className="transition-transform group-hover:-translate-x-1" />
20+
{label}
21+
</Link>
22+
)
23+
}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
'use client'
2+
3+
import { motion } from 'framer-motion'
4+
import { Microscope, Globe, Search } from 'lucide-react'
5+
import { FeatureBox } from './FeatureBox'
6+
7+
export default function CitizenScienceSection() {
8+
const features = [
9+
{
10+
title: "Create Your Own Studies",
11+
desc: "Anyone can create a study, become a prestigious scientist, get a link, and invite all their friends to join!",
12+
color: "bg-purple-400",
13+
icon: Microscope,
14+
media: "https://fdai.earth/wp-content/uploads/2024/03/create-study.gif",
15+
onClick: () => window.location.href = "https://safe.fdai.earth/app/public/#/app/study-creation"
16+
},
17+
{
18+
title: "Global Scale Studies",
19+
desc: "Studies are published in a Wikipedia for clinical research based on everyone's data, listing the likely effects of every food and drug.",
20+
color: "bg-indigo-400",
21+
icon: Globe,
22+
media: "https://fdai.earth/wp-content/uploads/2024/03/clinipedia-landing.gif",
23+
onClick: () => window.location.href = "https://studies.fdai.earth/"
24+
},
25+
{
26+
title: "Mega-Studies",
27+
desc: "Look up your condition and see how different foods, drugs and supplements tend to improve or worsen your condition.",
28+
color: "bg-violet-400",
29+
icon: Search,
30+
media: "https://fdai.earth/wp-content/uploads/2024/03/clinipedia-inflammatory-pain-small.gif",
31+
onClick: () => window.location.href = "https://studies.fdai.earth/variables/Overall_Mood"
32+
}
33+
]
34+
35+
return (
36+
<section className="relative overflow-visible rounded-xl border-4 border-black bg-gradient-to-r from-purple-400 to-indigo-400 p-6 shadow-[8px_8px_0px_0px_rgba(0,0,0,1)]">
37+
<h2 className="mb-6 text-4xl font-black uppercase">Citizen Science</h2>
38+
39+
<motion.div
40+
initial={{ opacity: 0, y: 20 }}
41+
animate={{ opacity: 1, y: 0 }}
42+
className="grid grid-cols-1 md:grid-cols-3 gap-8"
43+
>
44+
{features.map((feature, index) => (
45+
<FeatureBox
46+
key={feature.title}
47+
title={feature.title}
48+
desc={feature.desc}
49+
color={feature.color}
50+
icon={feature.icon}
51+
media={feature.media}
52+
index={index}
53+
onClick={feature.onClick}
54+
/>
55+
))}
56+
</motion.div>
57+
</section>
58+
)
59+
}

app/dfda/components/CostSavingsTable.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,19 @@ export default function CostSavingsTable() {
5959

6060
return (
6161
<div className="relative overflow-hidden rounded-xl border-4 border-black bg-white p-6 shadow-[8px_8px_0px_0px_rgba(0,0,0,1)]">
62+
<motion.h1
63+
className="mb-6 text-4xl md:text-4xl font-black uppercase"
64+
initial={{ opacity: 0, y: -20 }}
65+
animate={{ opacity: 1, y: 0 }}
66+
>
67+
👀Look at those savings! 🤑
68+
</motion.h1>
6269
<motion.h2
63-
className="mb-6 text-2xl md:text-4xl font-black uppercase"
70+
className="mb-6 md:text-2xl font-black uppercase"
6471
initial={{ opacity: 0, y: -20 }}
6572
animate={{ opacity: 1, y: 0 }}
6673
>
67-
Clinical Trial Cost Savings 💰
74+
Savings from a Decentralized Autonomous FDA
6875
</motion.h2>
6976

7077
<div className="-mx-6 sm:mx-0">

app/dfda/components/FeatureBox.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ interface FeatureBoxProps {
88
desc: string
99
color: string
1010
icon: React.ElementType
11-
media: string
11+
media?: string
1212
index: number
1313
onClick: () => void
1414
}
@@ -76,7 +76,7 @@ export const FeatureBox: React.FC<FeatureBoxProps> = ({ title, desc, color, icon
7676
className={`group relative overflow-hidden rounded-xl border-4 border-black ${color} p-6 shadow-[8px_8px_0px_0px_rgba(0,0,0,1)] transition-all hover:translate-x-1 hover:translate-y-1 hover:shadow-none block w-full text-left`}
7777
>
7878
<div className="absolute inset-0 bg-black opacity-0 transition-opacity group-hover:opacity-10" />
79-
<MediaContent media={media} />
79+
{media && <MediaContent media={media} />}
8080
<Icon className="mb-4 h-12 w-12" />
8181
<h3 className="mb-2 text-2xl font-black">{title}</h3>
8282
<p className="font-bold">{desc}</p>
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
'use client'
2+
3+
import { motion } from 'framer-motion'
4+
import Image from 'next/image'
5+
6+
export default function GoodNewsSection() {
7+
return (
8+
<section className="relative overflow-visible rounded-xl border-4 border-black bg-gradient-to-r from-yellow-400 to-amber-400 p-6 shadow-[8px_8px_0px_0px_rgba(0,0,0,1)]">
9+
<motion.div
10+
initial={{ opacity: 0, scale: 0.95 }}
11+
animate={{ opacity: 1, scale: 1 }}
12+
className="space-y-6"
13+
>
14+
<h2 className="text-4xl font-black uppercase">The Good News!</h2>
15+
<p className="text-2xl font-bold">There could be billions of cures we don't even know about yet!</p>
16+
17+
<div className="rounded-lg p-6">
18+
<p className="text-xl mb-4">
19+
There are over 166 billion possible medicinal molecules, and we've only tested 0.00001% so far.
20+
</p>
21+
<Image
22+
src="https://fdai.earth/wp-content/uploads/2024/03/studied-molecules-chart-no-background.png"
23+
alt="Studied molecules chart"
24+
width={800}
25+
height={400}
26+
className="rounded-lg"
27+
/>
28+
</div>
29+
30+
<div className="rounded-lg p-6">
31+
<h3 className="text-2xl font-bold mb-4">Clinical Research Cost Trends</h3>
32+
<Image
33+
src="https://fdai.earth/wp-content/uploads/2024/03/Cost-to-Develop-A-New-Drug-no-arrows-e1710115343651-1024x742.png"
34+
alt="Cost trends"
35+
width={1024}
36+
height={742}
37+
className="rounded-lg"
38+
/>
39+
<p className="text-xl mt-4">
40+
With automation, we could dramatically reduce these costs and accelerate discovery.
41+
</p>
42+
</div>
43+
</motion.div>
44+
</section>
45+
)
46+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
'use client'
2+
3+
import { motion } from 'framer-motion'
4+
5+
export default function MissionSection() {
6+
return (
7+
<section className="relative overflow-visible rounded-xl border-4 border-black bg-gradient-to-r from-blue-400 to-indigo-400 p-6 shadow-[8px_8px_0px_0px_rgba(0,0,0,1)]">
8+
<motion.div
9+
initial={{ opacity: 0, y: 20 }}
10+
animate={{ opacity: 1, y: 0 }}
11+
className="space-y-6"
12+
>
13+
<h2 className="text-4xl font-black">The Decentralized FDA</h2>
14+
<p className="text-2xl font-bold">
15+
Our mandate is to promote human health and safety by determining the comprehensive positive and negative effects of all foods and drugs.
16+
</p>
17+
18+
<div className="rounded-lg p-6">
19+
<h3 className="text-2xl font-bold mb-4">Key Problems We're Solving:</h3>
20+
<ul className="list-disc ml-6 space-y-2 text-xl">
21+
<li>No data on unpatentable molecules and natural compounds</li>
22+
<li>Lack of incentive to discover new applications for off-patent treatments</li>
23+
<li>Missing long-term outcome data</li>
24+
<li>Negative results aren't published</li>
25+
<li>Clinical trials exclude most of the population</li>
26+
</ul>
27+
</div>
28+
</motion.div>
29+
</section>
30+
)
31+
}

app/dfda/components/PredictorSearchAutocomplete.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default function PredictorSearchAutocomplete({ onVariableSelect }: Predic
1313
onVariableSelect={onVariableSelect}
1414
searchParams={{
1515
sort: '-numberOfCorrelationsAsCause',
16-
public: '1'
16+
//public: '1'
1717
}}
1818
placeholder="Enter food or drug 💊"
1919
/>
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
'use client'
2+
3+
import { motion } from 'framer-motion'
4+
import Image from 'next/image'
5+
6+
export default function ProblemSection() {
7+
return (
8+
<section className="space-y-8">
9+
<div className="relative overflow-visible rounded-xl border-4 border-black bg-gradient-to-r from-red-400 to-orange-400 p-6 shadow-[8px_8px_0px_0px_rgba(0,0,0,1)]">
10+
<h2 className="mb-6 text-4xl font-black uppercase">The Growing Crisis</h2>
11+
12+
<motion.div
13+
initial={{ opacity: 0, y: 20 }}
14+
animate={{ opacity: 1, y: 0 }}
15+
className="space-y-6"
16+
>
17+
<div className="rounded-lg p-6">
18+
<h3 className="text-2xl font-bold mb-4">Chronic Disease Epidemic</h3>
19+
<p className="text-xl mb-4">2 Billion People are SUFFERING from chronic diseases like depression, fibromyalgia, Crohn's disease, and multiple sclerosis.</p>
20+
<Image
21+
src="https://fdai.earth/wp-content/uploads/2024/03/correlates-of-disease-incidence-no-title-1024x514.png"
22+
alt="Disease incidence trends"
23+
width={1024}
24+
height={514}
25+
className="rounded-lg"
26+
/>
27+
</div>
28+
29+
<div className="rounded-lg p-6">
30+
<h3 className="text-2xl font-bold mb-4">Chemical Exposure</h3>
31+
<p className="text-xl mb-4">We only have long-term toxicology data on 2 of over 7000 preservatives, flavorings, emulsifiers, sweeteners, pesticides, contaminants, and herbicides.</p>
32+
<Image
33+
src="https://fdai.earth/wp-content/uploads/2024/03/chemicals-in-our-diet.png"
34+
alt="Chemicals in diet"
35+
width={800}
36+
height={400}
37+
className="rounded-lg"
38+
/>
39+
</div>
40+
41+
<div className="rounded-lg p-6">
42+
<h3 className="text-2xl font-bold mb-4">Research Bottleneck</h3>
43+
<ul className="list-disc ml-6 space-y-2 text-xl">
44+
<li>$2.6 billion and 12 years to bring a new drug to market</li>
45+
<li>Only 30 drugs approved per year</li>
46+
<li>80% of trials fail due to insufficient participants</li>
47+
<li>Less than 1% of chronic disease patients participate in research</li>
48+
</ul>
49+
</div>
50+
</motion.div>
51+
</div>
52+
</section>
53+
)
54+
}

app/dfda/components/SearchAutocomplete.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ export default function SearchAutocomplete({ onSelect, placeholder, searchFuncti
2626
}, [query, searchFunction])
2727

2828
const handleSuggestionClick = (suggestion: string) => {
29-
debugger
3029
setQuery(suggestion)
3130
setShowDropdown(false)
3231
onSelect(suggestion)

0 commit comments

Comments
 (0)