Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 3 additions & 59 deletions components/Earn/EarnRightSidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,38 +1,10 @@
'use client';

import React, { useState } from 'react';
import Link from 'next/link';
import {
Award,
BookOpen,
MessageSquare,
ExternalLink,
Coins,
HelpCircle,
Route,
Feather,
Users,
ArrowUpRightSquare,
} from 'lucide-react';
import { CollapsibleItem, SimpleCollapsibleSection } from '@/components/ui/CollapsibleSection';
import { useRouter } from 'next/navigation';
import { Icon } from '@/components/ui/icons/Icon';
import React from 'react';
import { ExternalLink, Users } from 'lucide-react';
import { RightSidebarBanner } from '@/components/ui/RightSidebarBanner';

export const EarnRightSidebar = () => {
const router = useRouter();
const [openSections, setOpenSections] = useState<string[]>([]);

const toggleSection = (section: string) => {
setOpenSections((prev) =>
prev.includes(section) ? prev.filter((s) => s !== section) : [...prev, section]
);
};

const handleCreateBounty = () => {
router.push('/bounty/create');
};

return (
<div className="space-y-6">
<RightSidebarBanner
Expand All @@ -52,7 +24,7 @@ export const EarnRightSidebar = () => {
<h3 className="text-lg font-semibold mb-3 text-gray-900">Resources</h3>
<div className="space-y-3">
<a
href="https://blog.researchhub.foundation/peer-reviewing-on-researchhub/"
href="https://docs.researchhub.com/researchhub-foundation/programs-and-initiatives/peer-review-program/peer-review-program-guidelines"
target="_blank"
rel="noopener noreferrer"
className="flex items-center justify-between text-sm text-primary-600 hover:text-primary-700 transition-colors"
Expand All @@ -65,34 +37,6 @@ export const EarnRightSidebar = () => {
<ExternalLink size={14} className="text-gray-400" />
</div>
</a>
<a
href="https://drive.google.com/file/d/1t7NpL39ghnBY9ImWjuunbc6gzmzrhqUt/view?ref=blog.researchhub.foundation"
target="_blank"
rel="noopener noreferrer"
className="flex items-center justify-between text-sm text-primary-600 hover:text-primary-700 transition-colors"
>
<div className="flex items-center gap-2">
<Feather size={16} className="text-primary-600" />
<span>Peer Review Guidelines (Preprint)</span>
</div>
<div className="ml-4">
<ExternalLink size={14} className="text-gray-400" />
</div>
</a>
<a
href="https://airtable.com/apptLQP8XMy1kaiID/paguOk9TtZktFk5WQ/form"
target="_blank"
rel="noopener noreferrer"
className="flex items-center justify-between text-sm text-primary-600 hover:text-primary-700 transition-colors"
>
<div className="flex items-center gap-2">
<Award size={16} className="text-primary-600" />
<span>Request a Peer Review Bounty</span>
</div>
<div className="ml-4">
<ExternalLink size={14} className="text-gray-400" />
</div>
</a>
</div>
</div>

Expand Down
122 changes: 34 additions & 88 deletions components/Fund/FundRightSidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,32 +1,10 @@
'use client';

import React, { useState } from 'react';
import { CollapsibleItem, SimpleCollapsibleSection } from '@/components/ui/CollapsibleSection';
import {
BookCheck,
Lightbulb,
Zap,
Banknote,
Target,
Share2,
Feather,
ArrowUpRightSquare,
Check,
ExternalLink,
} from 'lucide-react';
import { Icon } from '@/components/ui/icons/Icon';
import Link from 'next/link';
import React from 'react';
import { BookCheck, Feather, ExternalLink } from 'lucide-react';
import { RightSidebarBanner } from '@/components/ui/RightSidebarBanner';

export const FundRightSidebar = () => {
const [openSections, setOpenSections] = useState<string[]>(['why-fund']); // Default open section

const toggleSection = (section: string) => {
setOpenSections((prev) =>
prev.includes(section) ? prev.filter((s) => s !== section) : [...prev, section]
);
};

return (
<div className="space-y-6">
<RightSidebarBanner
Expand All @@ -50,7 +28,7 @@ export const FundRightSidebar = () => {
<h3 className="text-lg font-semibold mb-3 text-gray-900">Resources</h3>
<div className="space-y-3">
<a
href="https://blog.researchhub.foundation/funding-for-researchers/"
href="https://docs.researchhub.com/researchhub/product-features/fund/funding-recipients"
target="_blank"
rel="noopener noreferrer"
className="flex items-center justify-between text-sm text-primary-600 hover:text-primary-700 transition-colors"
Expand All @@ -64,14 +42,14 @@ export const FundRightSidebar = () => {
</div>
</a>
<a
href="https://drive.google.com/file/d/1wQVjVfy4x6VadIExEysx4VyLJN9dkD53/view"
href="https://docs.researchhub.com/researchhub-foundation/programs-and-initiatives/peer-review-program/peer-review-program-guidelines"
target="_blank"
rel="noopener noreferrer"
className="flex items-center justify-between text-sm text-primary-600 hover:text-primary-700 transition-colors"
>
<div className="flex items-center gap-2">
<Feather size={16} className="text-primary-600" />
<span>Peer Review Guidelines (Funding)</span>
<span>Peer Review Guidelines</span>
</div>
<div className="ml-4">
<ExternalLink size={14} className="text-gray-400" />
Expand All @@ -80,67 +58,35 @@ export const FundRightSidebar = () => {
</div>
</div>

<SimpleCollapsibleSection title="How does it work?">
<div className="pl-6">
<CollapsibleItem
title="1. Plan your experiment"
isOpen={openSections.includes('preregister')}
onToggle={() => toggleSection('preregister')}
>
Researchers plan their experiment in the open, providing all relevant methodological
details and planned analyses openly before receiving funding.
</CollapsibleItem>
<CollapsibleItem
title="2. Link a nonprofit (Recommended)"
isOpen={openSections.includes('tax-deduct')}
onToggle={() => toggleSection('tax-deduct')}
>
Researchers can coordinate with a qualifying nonprofit via the lab notebook to enable
tax deductions for donors and improved processing of funds.
</CollapsibleItem>
<CollapsibleItem
title="3. Receive expert review"
isOpen={openSections.includes('peer-review')}
onToggle={() => toggleSection('peer-review')}
>
Experts and the community review the proposal, providing feedback to improve rigor and
reproducibility, offering insight into the work.
</CollapsibleItem>
<CollapsibleItem
title="4. Receive crowdfunding"
isOpen={openSections.includes('pledge')}
onToggle={() => toggleSection('pledge')}
>
Users review the proposal and peer feedback, then contribute funds (any amount) directly
to the projects they support via RSC or USD.
</CollapsibleItem>
<CollapsibleItem
title="5. Funds are disbursed"
isOpen={openSections.includes('disburse')}
onToggle={() => toggleSection('disburse')}
>
Once fully raised,{' '}
<Link
href="https://endaoment.org"
target="_blank"
rel="noopener noreferrer"
className="text-primary-600 hover:underline"
>
Endaoment
</Link>{' '}
provides nonprofit support, asset conversion, and sends contributions directly to the
institution or researcher.
</CollapsibleItem>
<CollapsibleItem
title="6. Funds arrive"
isOpen={openSections.includes('unrestricted')}
onToggle={() => toggleSection('unrestricted')}
>
Funds arrive in the researcher's discretionary spending account at their institution,
free from traditional grant restrictions on usage.
</CollapsibleItem>
</div>
</SimpleCollapsibleSection>
<div>
<h3 className="text-md font-semibold mb-4">How to Request Funding</h3>
<ol className="list-none space-y-3 text-gray-600 mb-4 text-sm">
<li className="flex">
<span className="mr-3 font-medium">1.</span>
<span>Create your research proposal</span>
</li>
<li className="flex">
<span className="mr-3 font-medium">2.</span>
<span>Include a clear budget</span>
</li>
<li className="flex">
<span className="mr-3 font-medium">3.</span>
<span>Add your university as the nonprofit recipient</span>
</li>
<li className="flex">
<span className="mr-3 font-medium">4.</span>
<span>Upload for crowdfunding or an RFP</span>
</li>
<li className="flex">
<span className="mr-3 font-medium">5.</span>
<span>Use peer review to improve your work</span>
</li>
<li className="flex">
<span className="mr-3 font-medium">6.</span>
<span>Receive funds to your institution</span>
</li>
</ol>
</div>
</div>
);
};
102 changes: 31 additions & 71 deletions components/Fund/GrantRightSidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
'use client';

import React, { useState } from 'react';
import { CollapsibleItem, SimpleCollapsibleSection } from '@/components/ui/CollapsibleSection';
import React from 'react';
import { Icon } from '@/components/ui/icons/Icon';
import { RightSidebarBanner } from '@/components/ui/RightSidebarBanner';
import { Check, ExternalLink } from 'lucide-react';
import { ExternalLink } from 'lucide-react';

export const GrantRightSidebar = () => {
const [openSections, setOpenSections] = useState<string[]>(['why-proposal']); // Default open section

const toggleSection = (section: string) => {
setOpenSections((prev) =>
prev.includes(section) ? prev.filter((s) => s !== section) : [...prev, section]
);
};

return (
<div className="space-y-6">
<RightSidebarBanner
Expand All @@ -34,28 +25,14 @@ export const GrantRightSidebar = () => {
<h3 className="text-lg font-semibold mb-3 text-gray-900">Resources</h3>
<div className="space-y-3">
<a
href=" https://drive.google.com/file/d/1VM8CueEvUhn4gZc3bNdrIRzSfZ9Tr8-j/view?usp=drive_link"
href="https://docs.researchhub.com/researchhub/product-features/fund"
target="_blank"
rel="noopener noreferrer"
className="flex items-center justify-between text-sm text-primary-600 hover:text-primary-700 transition-colors"
>
<div className="flex items-center gap-2">
<Icon name="fund" size={16} color="#2563eb" />
<span>Funding on ResearchHub</span>
</div>
<div className="ml-4">
<ExternalLink size={14} className="text-gray-400" />
</div>
</a>
<a
href="https://calendar.app.google/riCwbFUFaWavXfAn6"
target="_blank"
rel="noopener noreferrer"
className="flex items-center justify-between text-sm text-primary-600 hover:text-primary-700 transition-colors"
>
<div className="flex items-center gap-2">
<Icon name="comment" size={16} color="#2563eb" />
<span>Talk to the Team</span>
<span className="whitespace-nowrap">Funding Guide</span>
</div>
<div className="ml-4">
<ExternalLink size={14} className="text-gray-400" />
Expand All @@ -64,50 +41,33 @@ export const GrantRightSidebar = () => {
</div>
</div>

{/* Informational Sections */}
<SimpleCollapsibleSection title="Open science = better science">
<div className="pl-6">
<CollapsibleItem
title="Prevents p-hacking"
icon={<Check className="w-4 h-4" strokeWidth={2.5} />}
isOpen={openSections.includes('prevents-hacking')}
onToggle={() => toggleSection('prevents-hacking')}
>
When researchers outline analyses beforehand, they're reputationally incentivized to
explain any deviations.
</CollapsibleItem>

<CollapsibleItem
title="Incentivizes results sharing"
icon={<Check className="w-4 h-4" strokeWidth={2.5} />}
isOpen={openSections.includes('forces-publication')}
onToggle={() => toggleSection('forces-publication')}
>
By requiring pre-registration, we ensure that researchers share their findings
regardless of the outcome.
</CollapsibleItem>

<CollapsibleItem
title="Enables independent replication"
icon={<Check className="w-4 h-4" strokeWidth={2.5} />}
isOpen={openSections.includes('enables-replication')}
onToggle={() => toggleSection('enables-replication')}
>
Pre-registered protocols provide clear roadmaps for other researchers to replicate and
build upon your work.
</CollapsibleItem>

<CollapsibleItem
title="Expert review before funding"
icon={<Check className="w-4 h-4" strokeWidth={2.5} />}
isOpen={openSections.includes('expert-review')}
onToggle={() => toggleSection('expert-review')}
>
Our peer review process ensures that only high-quality, well-designed studies receive
funding.
</CollapsibleItem>
</div>
</SimpleCollapsibleSection>
<div>
<h3 className="text-md font-semibold mb-4">How Funding Works</h3>
<ol className="list-none space-y-3 text-gray-600 mb-4 text-sm">
<li className="flex">
<span className="mr-3 font-medium">1.</span>
<span>Upload an RFP</span>
</li>
<li className="flex">
<span className="mr-3 font-medium">2.</span>
<span>ResearchHub recruits applicants</span>
</li>
<li className="flex">
<span className="mr-3 font-medium">3.</span>
<span>Peer review helps improve proposals</span>
</li>
<li className="flex">
<span className="mr-3 font-medium">4.</span>
<span>
Distribute funds to proposals (Tax-deductible with 0–10% university overhead)
</span>
</li>
<li className="flex">
<span className="mr-3 font-medium">5.</span>
<span>Researchers share progress updates</span>
</li>
</ol>
</div>
</div>
);
};
2 changes: 1 addition & 1 deletion components/Leaderboard/LeaderboardOverview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ export const LeaderboardOverview = () => {
href="/earn"
className="mt-4 block w-full text-center text-sm text-primary-600 hover:text-primary-700 font-medium py-2 px-3 rounded-md border border-primary-200 hover:bg-primary-50 transition-colors"
>
View preprints needing review
View peer reviewing opportunities
</Link>
</div>

Expand Down