diff --git a/app/components/Card/index.tsx b/app/components/Card/index.tsx index 62a00589..17564bc0 100644 --- a/app/components/Card/index.tsx +++ b/app/components/Card/index.tsx @@ -1,17 +1,27 @@ -import {SVGProps} from 'react' -import Button from '../Button' +import {ReactNode, SVGProps} from 'react' +import Button from '~/components/Button' +import {ArrowRight} from '~/components/icons-generated' import './card.css' interface CardProps { title: string - description: string + description: ReactNode impact?: string icon: (props: SVGProps) => JSX.Element action: string + actionDesc?: string className?: string } -export default function Card({title, description, impact, icon, action, className}: CardProps) { +export default function Card({ + title, + description, + impact, + icon, + action, + actionDesc, + className, +}: CardProps) { className = `card bordered ${className}` return ( @@ -20,6 +30,12 @@ export default function Card({title, description, impact, icon, action, classNam

{title}

{description}

+ {actionDesc && ( +

+ {actionDesc} + +

+ )} {impact &&

{impact}

}
diff --git a/app/components/HowCanIHelp/Base.tsx b/app/components/HowCanIHelp/Base.tsx index 2482d87c..155c4089 100644 --- a/app/components/HowCanIHelp/Base.tsx +++ b/app/components/HowCanIHelp/Base.tsx @@ -1,15 +1,14 @@ import {Link} from '@remix-run/react' import Page from '~/components/Page' -import HelpMethods from '~/components/HowCanIHelp/HelpMethods' -import {HelpPage, helpUrl} from '~/routesMapper' +import HelpMethods, {HelpMethodsProps} from '~/components/HowCanIHelp/HelpMethods' +import {helpUrl} from '~/routesMapper' import {ReactNode} from 'react' type BaseProps = { title: string - subpage: HelpPage children: ReactNode -} -export default function Base({title, subpage, children}: BaseProps) { +} & HelpMethodsProps +export default function Base({title, current, children, ...props}: BaseProps) { return (
@@ -22,7 +21,7 @@ export default function Base({title, subpage, children}: BaseProps) { {children} - +
diff --git a/app/components/HowCanIHelp/HelpMethods.tsx b/app/components/HowCanIHelp/HelpMethods.tsx index aa6a4b55..dfe4ba50 100644 --- a/app/components/HowCanIHelp/HelpMethods.tsx +++ b/app/components/HowCanIHelp/HelpMethods.tsx @@ -1,3 +1,4 @@ +import {ReactNode} from 'react' import Card from '~/components/Card' import CardSmall from '~/components/CardSmall' import {HelpPage, helpUrl} from '~/routesMapper' @@ -8,39 +9,113 @@ import {Megaphone} from '~/components/icons-generated' import {PiggyBank} from '~/components/icons-generated' import {Hand} from '~/components/icons-generated' -type HelpMethodsProps = { +const titles = { + career: ( +
+ Multiply your impact: +
+ Support your career pursuit +
+ ), + grassroots: ( +
+ Multiply your positive impact: +
+ Support your advocacy efforts +
+ ), + donate: ( +
+ Multiply your postive impact: +
+ Support your donation efforts +
+ ), + volunteer: ( +
+ Multiply your positive impact: +
+ Support your volunteer efforts +
+ ), + knowledge: ( +
+ Boost your learning efforts: +
+ Join a community +
+ ), + community: ( +
+ Boost your efforts: +
+ Learn more about AI safety +
+ ), +} + +const knowledgeDescriptions = { + donate: 'The more you know about this topic, the further your donation efforts will go', +} + +const communityDescriptions = { + donate: + 'Connecting with other advocates online or in person will help guide donation decisions, and can be motivating', +} + +const KnowledgeCard = ({current}: {current?: HelpPage}) => { + if (current == 'knowledge') return null + const defaultDescription = + 'Learning more about AI safety and the alignment problem is essential if you want to pursue a career in this field' + return ( + + ) +} + +const CommunityCard = ({current}: {current?: string}) => { + if (current === 'community') return null + const defaultDescription = + 'Connecting with others online or in person will help you navigate the transition to a career in AI safety' + return ( + + ) +} + +export type HelpMethodsProps = { current?: HelpPage - header?: string - subheader?: string + footerTitle?: ReactNode + footerSubheader?: ReactNode } const HelpMethods = ({ current, - header = 'Multiply your impact: Support your career pursuit', - subheader = 'Or, explore more ways to help directly', + footerTitle, + footerSubheader = 'Or, explore more ways to help directly', }: HelpMethodsProps) => (
-

{header}

+

{footerTitle || (current && titles[current])}

- {current !== 'knowledge' && ( - - )} - {current !== 'community' && ( - - )} + +
-

{subheader}

+

{footerSubheader}

{current !== 'career' && ( + diff --git a/app/routes/how-can-i-help.community.tsx b/app/routes/how-can-i-help.community.tsx index 07d78217..c486e813 100644 --- a/app/routes/how-can-i-help.community.tsx +++ b/app/routes/how-can-i-help.community.tsx @@ -7,7 +7,7 @@ export const meta: MetaFunction = () => { export default function Community() { return ( - +
fill me out, please
) diff --git a/app/routes/how-can-i-help.donate.tsx b/app/routes/how-can-i-help.donate.tsx index ec5c440c..6e77bed4 100644 --- a/app/routes/how-can-i-help.donate.tsx +++ b/app/routes/how-can-i-help.donate.tsx @@ -10,7 +10,7 @@ export const meta: MetaFunction = () => { export default function Donate() { return ( - +
diff --git a/app/routes/how-can-i-help.grassroots.tsx b/app/routes/how-can-i-help.grassroots.tsx index d4c8d545..c7e6a325 100644 --- a/app/routes/how-can-i-help.grassroots.tsx +++ b/app/routes/how-can-i-help.grassroots.tsx @@ -148,7 +148,7 @@ export default function Grassroots() { } }, []) return ( - Spread the word &
grassroots activism} subpage="grassroots"> + Spread the word &
grassroots activism} current="grassroots"> diff --git a/app/routes/how-can-i-help.knowledge.tsx b/app/routes/how-can-i-help.knowledge.tsx index 64d62758..4d73d5da 100644 --- a/app/routes/how-can-i-help.knowledge.tsx +++ b/app/routes/how-can-i-help.knowledge.tsx @@ -216,7 +216,7 @@ export default function Knowledge() { } }, []) return ( - + diff --git a/app/routes/how-can-i-help.volunteer.tsx b/app/routes/how-can-i-help.volunteer.tsx index 1bc73101..8bb0b3c4 100644 --- a/app/routes/how-can-i-help.volunteer.tsx +++ b/app/routes/how-can-i-help.volunteer.tsx @@ -7,7 +7,7 @@ export const meta: MetaFunction = () => { export default function Volunteer() { return ( - +
fill me out, please
)