From ad33029dd2148ae0c2dc886a73c10f716410d2ca Mon Sep 17 00:00:00 2001 From: Francesco Sansalvadore Date: Tue, 16 May 2023 19:06:13 +0200 Subject: [PATCH] chore: toggle grid button --- apps/www/components/Hero/Hero.tsx | 90 +++++++++++---------- apps/www/components/Hero/HeroBackground.tsx | 4 +- 2 files changed, 51 insertions(+), 43 deletions(-) diff --git a/apps/www/components/Hero/Hero.tsx b/apps/www/components/Hero/Hero.tsx index 8e2f016efba..dc60ac2bee6 100644 --- a/apps/www/components/Hero/Hero.tsx +++ b/apps/www/components/Hero/Hero.tsx @@ -7,64 +7,72 @@ import { Button, IconBookOpen } from 'ui' import SectionContainer from '~/components/Layouts/SectionContainer' import HeroBackground from './HeroBackground' import FrontendFrameworks from './FrontendFrameworks' +import { useState } from 'react' const Hero = () => { const router = useRouter() const telemetryProps = useTelemetryProps() - + const [showGrid, setShowGrid] = useState(true) const sendTelemetryEvent = async (event: TelemetryEvent) => { await Telemetry.sendEvent(event, telemetryProps, router) } return ( -
- -
-
-
-
-
-

+ +

+
+ +
+
+
+
+
+

- Build in a weekend - - Scale to millions - -

-

- Supabase is an open source Firebase alternative for building secure and - performant Postgres backends with minimal configuration. -

+ > + Build in a weekend + + Scale to millions + + +

+ Supabase is an open source Firebase alternative for building secure and + performant Postgres backends with minimal configuration. +

+
+ +
- -
-
- - -
+ + +
+ ) } diff --git a/apps/www/components/Hero/HeroBackground.tsx b/apps/www/components/Hero/HeroBackground.tsx index 22a2a113a64..dfa0d6be91a 100644 --- a/apps/www/components/Hero/HeroBackground.tsx +++ b/apps/www/components/Hero/HeroBackground.tsx @@ -4,7 +4,7 @@ import styles from './hero.module.css' const HeroGrid = dynamic(() => import('./HeroGrid')) -const HeroBackground = () => ( +const HeroBackground = ({ showGrid }: any) => ( <>
( >
- + {showGrid && }
)