diff --git a/src/app/components/FinancialContributors.tsx b/src/app/components/FinancialContributors.tsx new file mode 100644 index 000000000..5cceed8bf --- /dev/null +++ b/src/app/components/FinancialContributors.tsx @@ -0,0 +1,30 @@ +import { getSummaryReport } from '@/js/graphql/opencollective' +import { FinancialBackerAccountType } from '@/js/types' +import { DonateButton } from './LandingCTA' + +/** + * List financial contributors + */ +export const FinancialContributors: React.FC = async () => { + const { donors, totalRaised } = await getSummaryReport() + + return ( +
+
+

Financial Contributors

+ Total: {new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' }).format(totalRaised)} +
+
+
+ {donors.map(donor => )} +
+ +
+
+ ) +} + +const Donor: React.FC<{ donor: FinancialBackerAccountType }> = ({ donor }) => { + const { name } = donor.account + return (
{name}
) +} diff --git a/src/app/components/LandingCTA.tsx b/src/app/components/LandingCTA.tsx index 80b28b902..7653e6296 100644 --- a/src/app/components/LandingCTA.tsx +++ b/src/app/components/LandingCTA.tsx @@ -1,11 +1,12 @@ import clx from 'classnames' + import { LoginButtonClient } from './LoginButton' import { ShowEmailJS } from './ShowEmailJS' import { ReactNode } from 'react' export const LandingCTA: React.FC = () => { return ( -
+
@@ -46,7 +47,7 @@ const Card4All: React.FC = () => {
  • ☑️ Help us make your local climbing area's pages even better!
  • } - action={} + action={} /> ) } @@ -61,12 +62,14 @@ const Leaders: React.FC = () => { ) } +export const DonateButton: React.FC = () => (Donate) + const Donate: React.FC = () => { return ( Donate} + action={} /> ) } @@ -82,7 +85,7 @@ const Card: React.FC = ({ title, body, action, className }) => { return (

    {title}

    -
    +
    {body}
    diff --git a/src/app/components/LandingHero.tsx b/src/app/components/LandingHero.tsx index d535cdb2f..54f52a9ba 100644 --- a/src/app/components/LandingHero.tsx +++ b/src/app/components/LandingHero.tsx @@ -1,8 +1,9 @@ export const LandingHero: React.FC = () => { return ( -
    -

    Share your climbing route knowledge!

    -

    Join OpenBeta and help build a community resource for climbers

    +
    +

    Share your climbing route knowledge!

    +
    Join OpenBeta and help build a community resource for climbers
    +
    ) } diff --git a/src/app/components/LoginButton.tsx b/src/app/components/LoginButton.tsx index 89766014f..a7f37d1fd 100644 --- a/src/app/components/LoginButton.tsx +++ b/src/app/components/LoginButton.tsx @@ -1,6 +1,8 @@ 'use client' import { signIn } from 'next-auth/react' +import { ArrowRightIcon } from '@heroicons/react/24/outline' + /** * Client-side button */ @@ -10,7 +12,7 @@ export const LoginButtonClient: React.FC<{ className: string, label: string }> = className={className} onClick={() => { void signIn('auth0') }} - >{label} + >{label} ) } diff --git a/src/app/global.css b/src/app/global.css index dc801c1c6..5192c3277 100644 --- a/src/app/global.css +++ b/src/app/global.css @@ -15,7 +15,7 @@ html { } h1 { - @apply text-base-content text-4xl lg:text-5xl tracking-tight mb-4; + @apply text-base-content text-4xl lg:text-5xl tracking-tight; } h2 { diff --git a/src/app/page.tsx b/src/app/page.tsx index b61c8e921..fe0b1f495 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -2,6 +2,7 @@ import { Suspense } from 'react' import { LandingCTA } from './components/LandingCTA' import { LandingHero } from './components/LandingHero' import { RecentEdits, RecentEditsSkeleton } from './components/RecentEdits' +import { FinancialContributors } from './components/FinancialContributors' import { RecentTags } from './components/RecentTags' import { USAToC } from './components/USAToC' @@ -20,9 +21,9 @@ export default async function Home (): Promise {
    -

    Our website is undergoing a facelift. Visit the old home.
    Questions or comments? hello@openbeta.io

    +
    -
    +
    }> @@ -30,6 +31,13 @@ export default async function Home (): Promise {
    +
    ) } + +const Annoucement: React.FC = () => ( +

    + Our website is undergoing a facelift. Visit the old home.
    + Questions or comments? hello@openbeta.io +

    ) diff --git a/src/components/ui/BackerCard.tsx b/src/components/ui/BackerCard.tsx index 8851b238c..d009033f4 100644 --- a/src/components/ui/BackerCard.tsx +++ b/src/components/ui/BackerCard.tsx @@ -5,17 +5,15 @@ interface BackerCardProps { export default function BackerCard ({ name, imageUrl }: BackerCardProps): JSX.Element { return ( -
    -
    -
    -
    - -
    -
    -
    - {name} +
    +
    +
    +
    +
    + {name} +
    ) }