Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proper base #791

Merged
merged 1 commit into from
Oct 20, 2024
Merged
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
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>
)
}
Loading