Skip to content

Commit

Permalink
Merge pull request #791 from StampyAI/better-base
Browse files Browse the repository at this point in the history
Proper base
  • Loading branch information
LeMurphant authored Oct 20, 2024
2 parents a92227b + a16041c commit 5e592ec
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 27 deletions.
10 changes: 9 additions & 1 deletion app/components/HowCanIHelp/Base.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@ import {Link} from '@remix-run/react'
import Page from '~/components/Page'
import HelpMethods from '~/components/HowCanIHelp/HelpMethods'
import {HelpPage, helpUrl} from '~/routesMapper'
import {ReactNode} from 'react'

export default function Base({title, subpage}: {title: string; subpage: HelpPage}) {
type BaseProps = {
title: string
subpage: HelpPage
children: ReactNode
}
export default function Base({title, subpage, children}: BaseProps) {
return (
<Page>
<div className="page-body">
Expand All @@ -14,6 +20,8 @@ export default function Base({title, subpage}: {title: string; subpage: HelpPage
<div>
<h1 className="teal-500 padding-bottom-40">{title}</h1>

{children}

<HelpMethods current={subpage} />
</div>
</div>
Expand Down
28 changes: 7 additions & 21 deletions app/routes/how-can-i-help.career.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import {Link} from '@remix-run/react'
import Page from '~/components/Page'
import {MetaFunction} from '@remix-run/node'
import CardSmall from '~/components/CardSmall'
import DropDown from '~/components/DropDown'
import {Microscope, GovermentBuilding, PuzzlePieces} from '~/components/icons-generated'
import HelpMethods from '~/components/HowCanIHelp/HelpMethods'
import HelpItem from '~/components/HowCanIHelp/HelpItem'
import {helpUrl} from '~/routesMapper'
import CategoryCarousel from '~/components/HowCanIHelp/CatgoryCarousel'
import Base from '~/components/HowCanIHelp/Base'
/* import './howcanihelp.css' */

export const meta: MetaFunction = () => {
Expand Down Expand Up @@ -437,25 +434,14 @@ const CareerPaths = () => (

export default function HowCanIHelp() {
return (
<Page>
<div className="page-body">
<div className="padding-bottom-16">
<Link to={helpUrl()}>How can I help with AI Safety?</Link>
</div>

<div>
<h1 className="teal-500 padding-bottom-40">Start a career</h1>
<CareerPaths />
<Base title="Start a career" subpage="career">
<CareerPaths />

<ResearchPath />
<ResearchPath />

<GovernancePath />
<GovernancePath />

<FieldBuildingPath />

<HelpMethods current="career" />
</div>
</div>
</Page>
<FieldBuildingPath />
</Base>
)
}
6 changes: 5 additions & 1 deletion app/routes/how-can-i-help.community.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,9 @@ export const meta: MetaFunction = () => {
}

export default function Community() {
return <Base title="Join the community" subpage="community" />
return (
<Base title="Join the community" subpage="community">
<div>fill me out, please</div>
</Base>
)
}
6 changes: 5 additions & 1 deletion app/routes/how-can-i-help.donate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,9 @@ export const meta: MetaFunction = () => {
}

export default function Donate() {
return <Base title="Donate to AISafety.info" subpage="donate" />
return (
<Base title="Donate to AISafety.info" subpage="donate">
<div>fill me out, please</div>
</Base>
)
}
6 changes: 5 additions & 1 deletion app/routes/how-can-i-help.grassroots.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,9 @@ export const meta: MetaFunction = () => {
}

export default function Grassroots() {
return <Base title="Help with grassroots AI Safety" subpage="grassroots" />
return (
<Base title="Help with grassroots AI Safety" subpage="grassroots">
<div>fill me out, please</div>
</Base>
)
}
6 changes: 5 additions & 1 deletion app/routes/how-can-i-help.knowledge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,9 @@ export const meta: MetaFunction = () => {
}

export default function Knowledge() {
return <Base title="Share knowledge about AI Safety" subpage="knowledge" />
return (
<Base title="Share knowledge about AI Safety" subpage="knowledge">
<div>fill me out, please</div>
</Base>
)
}
6 changes: 5 additions & 1 deletion app/routes/how-can-i-help.volunteer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,9 @@ export const meta: MetaFunction = () => {
}

export default function Volunteer() {
return <Base title="Volunteer for AISafety.info" subpage="volunteer" />
return (
<Base title="Volunteer for AISafety.info" subpage="volunteer">
<div>fill me out, please</div>
</Base>
)
}

0 comments on commit 5e592ec

Please sign in to comment.