|
1 | 1 | import {useEffect, useRef, useState, type KeyboardEvent, type ReactNode} from 'react'; |
2 | 2 | import clsx from 'clsx'; |
3 | 3 | import Link from '@docusaurus/Link'; |
4 | | -import useBaseUrl from '@docusaurus/useBaseUrl'; |
| 4 | +import useBaseUrl, {useBaseUrlUtils} from '@docusaurus/useBaseUrl'; |
5 | 5 | import Layout from '@theme/Layout'; |
| 6 | +import ThemedImage from '@theme/ThemedImage'; |
6 | 7 |
|
7 | 8 | import {docsRoutes} from '../constants/docsRoutes'; |
8 | 9 | import styles from './index.module.css'; |
@@ -152,6 +153,70 @@ function ReactIcon({className}: {className?: string}) { |
152 | 153 | ); |
153 | 154 | } |
154 | 155 |
|
| 156 | +const trustedByCompanies = [ |
| 157 | + {name: 'Academia.edu', logo: '/img/logos/academia_logo.svg', href: 'https://www.academia.edu', invertDark: true}, |
| 158 | + {name: 'ACTIVE Network', logo: '/img/logos/active_network_logo.png', href: 'https://www.activenetwork.com'}, |
| 159 | + {name: 'AirRobe', logo: '/img/logos/airrobe_logo.svg', href: 'https://www.airrobe.com', invertDark: true}, |
| 160 | + {name: 'Airtasker', logo: '/img/logos/airtasker_logo.svg', href: 'https://www.airtasker.com'}, |
| 161 | + {name: 'Attuned Education Partners', logo: '/img/logos/attuned_logo.png', href: 'https://attunedpartners.com', invertDark: true}, |
| 162 | + {name: 'City Falcon', logo: '/img/logos/city_falcon_logo.svg', href: 'https://www.cityfalcon.com', invertDark: true}, |
| 163 | + {name: 'ClientCircle', logo: '/img/logos/clientcircle_logo.svg', href: 'https://clientcircle.com'}, |
| 164 | + {name: 'Curbside Provisions', logo: '/img/logos/curbside_logo.png', href: 'https://curbsideprovisions.com'}, |
| 165 | + {name: 'Direct Dental', logo: '/img/logos/direct_dental_logo.png', href: 'https://directdental.com'}, |
| 166 | + {name: 'Ejbla', logo: '/img/logos/ejbla_logo.png', href: 'https://ejbla.com', invertDark: true}, |
| 167 | + {name: 'Estately', logo: '/img/logos/estately_logo.png', href: 'https://www.estately.com', invertDark: true}, |
| 168 | + {name: 'Heal.me', logo: '/img/logos/healme_logo.png', href: 'https://heal.me'}, |
| 169 | + {name: 'Jewlr', logo: '/img/logos/jewlr_logo.svg', href: 'https://www.jewlr.com', invertDark: true}, |
| 170 | + {name: 'Popmenu', logo: '/img/logos/popmenu_logo.png', href: 'https://popmenu.com'}, |
| 171 | + {name: 'Printivity', logo: '/img/logos/printivity_logo.png', href: 'https://www.printivity.com'}, |
| 172 | + {name: 'Sample Focus', logo: '/img/logos/sample_focus_logo.png', href: 'https://samplefocus.com', darkenLight: true}, |
| 173 | + {name: 'Simply Business', logo: '/img/logos/simply_business_logo.svg', href: 'https://www.simplybusiness.co.uk', invertDark: true}, |
| 174 | + {name: 'The Information', logo: '/img/logos/the_information_logo.svg', darkLogo: '/img/logos/the_information_logo_dark.svg', href: 'https://www.theinformation.com'}, |
| 175 | + {name: 'User Interviews', logo: '/img/logos/user_interviews_logo.svg', darkLogo: '/img/logos/user_interviews_logo_dark.svg', href: 'https://www.userinterviews.com'}, |
| 176 | +]; |
| 177 | + |
| 178 | +function TrustedBySection() { |
| 179 | + const {withBaseUrl} = useBaseUrlUtils(); |
| 180 | + return ( |
| 181 | + <section className={styles.trustedBy}> |
| 182 | + <div className="container"> |
| 183 | + <p className={styles.trustedByLabel}>Trusted in production by</p> |
| 184 | + <div className={styles.logoBar}> |
| 185 | + {trustedByCompanies.map((company) => ( |
| 186 | + <a |
| 187 | + key={company.name} |
| 188 | + href={company.href} |
| 189 | + target="_blank" |
| 190 | + rel="noopener noreferrer" |
| 191 | + className={clsx( |
| 192 | + styles.logoItem, |
| 193 | + company.invertDark && styles.invertDark, |
| 194 | + company.darkenLight && styles.darkenLight, |
| 195 | + )} |
| 196 | + title={company.name}> |
| 197 | + {company.darkLogo ? ( |
| 198 | + <ThemedImage |
| 199 | + sources={{ |
| 200 | + light: withBaseUrl(company.logo), |
| 201 | + dark: withBaseUrl(company.darkLogo), |
| 202 | + }} |
| 203 | + alt={company.name} |
| 204 | + /> |
| 205 | + ) : ( |
| 206 | + <img |
| 207 | + src={withBaseUrl(company.logo)} |
| 208 | + alt={company.name} |
| 209 | + loading="lazy" |
| 210 | + /> |
| 211 | + )} |
| 212 | + </a> |
| 213 | + ))} |
| 214 | + </div> |
| 215 | + </div> |
| 216 | + </section> |
| 217 | + ); |
| 218 | +} |
| 219 | + |
155 | 220 | function HeroSection() { |
156 | 221 | const [copyState, setCopyState] = useState<'idle' | 'copied' | 'error'>('idle'); |
157 | 222 | const [lang, setLang] = useState<Language>('ts'); |
@@ -504,6 +569,7 @@ export default function Home(): ReactNode { |
504 | 569 | <Layout description="Official React on Rails documentation, examples, and React on Rails Pro details."> |
505 | 570 | <HeroSection /> |
506 | 571 | <main> |
| 572 | + <TrustedBySection /> |
507 | 573 | <PersonaSection /> |
508 | 574 | <FlowSection /> |
509 | 575 | <UpgradeSection /> |
|
0 commit comments