diff --git a/react/src/components/About.js b/react/src/components/About.js index 8be3ddb8..05377a48 100644 --- a/react/src/components/About.js +++ b/react/src/components/About.js @@ -1,9 +1,9 @@ -import { Component } from 'react'; import { Link } from 'react-router-dom'; import slugify from '../utils/slugify'; import * as Sentry from '@sentry/react'; import './about.css'; import { isOddReleaseWeek, busy_sleep } from '../utils/time'; +import { useEffect } from 'react'; import Jane from './employees/jane'; import Lily from './employees/lily'; @@ -14,25 +14,21 @@ import Noah from './employees/noah'; const employees = [Jane, Lily, Keith, Mason, Emma, Noah]; -class About extends Component { - constructor() { - super(); - // must be inside the constructor to affect LCP, if in componentDidMount() only affects duration +function About({ backend }) { + useEffect(() => { if (!isOddReleaseWeek()) { // can't have async sleep in a constructor busy_sleep(Math.random(25) + 100); } - } - async componentDidMount() { // Http requests to make in parallel, so the Transaction has more Spans - let request1 = fetch(this.props.backend + '/api', { + let request1 = fetch(backend + '/api', { method: 'GET', }); - let request2 = fetch(this.props.backend + '/organization', { + let request2 = fetch(backend + '/organization', { method: 'GET', }); - let request3 = fetch(this.props.backend + '/connect', { + let request3 = fetch(backend + '/connect', { method: 'GET', }); @@ -40,7 +36,7 @@ class About extends Component { // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/allSettled#browser_compatibility // let response = await Promise.allSettled([request1, request2, request3]) - const response = [await request1, await request2, await request3]; + const response = [request1, request2, request3]; // Error Handling response.forEach((r) => { @@ -55,53 +51,51 @@ class About extends Component { ); } }); - } - render() { - return ( -
- Empower Plant is an IoT company determined to keep house plants - happy. After reading Michael Pollan’s 2013 New Yorker article - (“The Intelligent Plant”), the wife-and-wife founding team - invested their life savings in measuring and improving the - emotional state of their leafy housemates. Seven years later, the - company’s grown from its humble roots in the couples’ backyard - greenhouse (converted from a garage) into a Series C-funded San - Francisco startup and the world’s most accurate plant mood - measurer (“a must-have for any responsible plant parent,” - according to Plant Parenthood Magazine). Their original - state-of-the-art product is a technological marvel built with a - plant-first mindset, and they now offer a range of plant-centric - options. -
-- Today, the company employs 170 people (and 852 plants) in San - Francisco, New York City, Denver, and Kiev. -
-+ Empower Plant is an IoT company determined to keep house plants + happy. After reading Michael Pollan’s 2013 New Yorker article (“The + Intelligent Plant”), the wife-and-wife founding team invested their + life savings in measuring and improving the emotional state of their + leafy housemates. Seven years later, the company’s grown from its + humble roots in the couples’ backyard greenhouse (converted from a + garage) into a Series C-funded San Francisco startup and the world’s + most accurate plant mood measurer (“a must-have for any responsible + plant parent,” according to Plant Parenthood Magazine). Their + original state-of-the-art product is a technological marvel built + with a plant-first mindset, and they now offer a range of + plant-centric options. +
++ Today, the company employs 170 people (and 852 plants) in San + Francisco, New York City, Denver, and Kiev. +
- We were unable to process your order but will do everything we can to - make it right. Please reach out to us if you have - been charged or have any questions. -
-+ We were unable to process your order but will do everything we can to + make it right. Please reach out to us if you have + been charged or have any questions. +
+Keep your houseplants happy.
- -Keep your houseplants happy.
+- The page you're looking for can't be found and we can't get to the - root of it just yet. Please go back in your browser or go{' '} - back to our home page and accept our deepest - apologies. -
-- If the issue persists, please contact us. -
-+ The page you're looking for can't be found and we can't get to the root + of it just yet. Please go back in your browser or go{' '} + back to our home page and accept our deepest + apologies. +
++ If the issue persists, please contact us. +
+