The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
chore: cleanup unused code
Francesco Sansalvadorec5534b2fe79d
diff --git a/apps/www/components/Features/FeaturesNew.tsx b/apps/www/components/Features/FeaturesNew.tsxnew file mode 100644index 00000000000..8b63725e901--- /dev/null+++ b/apps/www/components/Features/FeaturesNew.tsx@@ -0,0 +1,195 @@+import Solutions from 'data/Solutions.json'+import Telemetry from '~/lib/telemetry'+import gaEvents from '~/lib/gaEvents'+import { useTelemetryProps } from 'common/hooks/useTelemetryProps'+import { useRouter } from 'next/router'+import Image from 'next/image'+import SectionContainer from '../Layouts/SectionContainer'+import { motion } from 'framer-motion'+import BackedBy from '../BackedBy'+import { useBreakpoint, useTheme } from 'common'+import FeatureCard from './FeatureCard'+import DatabaseVisual from './DatabaseVisual'++const opacityVariant = {+ default: { opacity: 1, filter: 'grayscale(1)', transition: { duration: 0.1 } },+ hover: {+ opacity: 1,+ filter: 'grayscale(0)',+ transition: { duration: 0.15 },+ },+}++const Features = () => {+ const router = useRouter()+ const telemetryProps = useTelemetryProps()++ const sendTelemetryEvent = async (product: any) => {+ switch (product) {+ case 'Database':+ return await Telemetry.sendEvent(+ gaEvents['www_hp_subhero_products_database'],+ telemetryProps,+ router+ )+ case 'Authentication':+ return await Telemetry.sendEvent(+ gaEvents['www_hp_subhero_products_auth'],+ telemetryProps,+ router+ )+ case 'Storage':+ return await Telemetry.sendEvent(+ gaEvents['www_hp_subhero_products_storage'],+ telemetryProps,+ router+ )+ case 'Edge Functions':+ return await Telemetry.sendEvent(+ gaEvents['www_hp_subhero_products_edgeFunctions'],+ telemetryProps,+ router+ )+ case 'Realtime':+ return await Telemetry.sendEvent(+ gaEvents['www_hp_subhero_products_realtime'],+ telemetryProps,+ router+ )+ }+ }+ const isSm = useBreakpoint(640)+ const { isDarkMode } = useTheme()++ return (+ <SectionContainer className="space-y-8 max-w-7xl mt-0 lg:mt-0 !pt-0">+ <h3 className="h3 text-center">Build faster and focus on your products</h3>+ <dl className="grid grid-cols-1 gap-4 sm:grid-cols-2 md:gap-4 lg:gap-6 md:grid-cols-6">+ <FeatureCard+ url={Solutions['database'].url}+ title={Solutions['database'].name}+ subtitle={+ <>+ Every project is a full Postgres database,+ <br className="inline-block sm:hidden lg:inline-block" /> the world's most trusted+ relational database.+ </>+ }+ onClick={() => sendTelemetryEvent(name)}+ image={+ <motion.div className="absolute inset-0 z-0" variants={opacityVariant}>+ <DatabaseVisual isDarkMode={isDarkMode} />+ </motion.div>+ }+ classname="col-span-full md:col-span-3"+ />+ <FeatureCard+ url={Solutions['authentication'].url}+ title={Solutions['authentication'].name}+ subtitle={+ <>+ Add user sign ups and logins,+ <br className="inline-block sm:hidden lg:inline-block" /> securing your data with Row+ Level Security.+ </>+ }+ image={+ <motion.div className="absolute inset-0 z-0" variants={opacityVariant}>+ <Image+ src={isDarkMode ? '/images/index/auth-dark.jpg' : '/images/index/auth-light.jpg'}+ alt="Supabase Authentication feature, hover image with glow"+ layout="fill"+ objectPosition="50% 50%"+ objectFit="cover"+ />+ </motion.div>+ }+ classname="md:col-span-3 lg:!col-span-2"+ onClick={() => sendTelemetryEvent(name)}+ />+ <FeatureCard+ url={Solutions['storage'].url}+ title={Solutions['storage'].name}+ subtitle={+ <>+ Store, organize, and serve large files,+ <br className="inline-block sm:hidden lg:inline-block" /> from videos to images.+ </>+ }+ image={+ <motion.div className="absolute inset-0 z-0" variants={opacityVariant}>+ <Image+ src={+ isDarkMode ? '/images/index/storage-dark.jpg' : '/images/index/storage-light.jpg'+ }+ alt="Supabase Storage feature, hover image with glow"+ layout="fill"+ objectPosition="50% 50%"+ objectFit="cover"+ quality={95}+ />+ </motion.div>+ }+ classname="md:!col-span-2 md:h-[350px] lg:h-[390px]"+ onClick={() => sendTelemetryEvent(name)}+ />+ <FeatureCard+ url={Solutions['edge-functions'].url}+ title={Solutions['edge-functions'].name}+ subtitle={+ <>+ Easily write custom code+ <br className="inline-block sm:hidden lg:inline-block" /> without deploying or scaling+ servers.+ </>+ }+ onClick={() => sendTelemetryEvent(name)}+ image={+ <motion.div className="absolute inset-0 z-0" variants={opacityVariant}>+ <Image+ src={isDarkMode ? '/images/index/edge-dark.jpg' : '/images/index/edge-light.jpg'}+ alt="Supabase Edge Functions feature, hover image with glow"+ layout="fill"+ objectPosition={isSm ? 'bottom' : '50% 50%'}+ objectFit={isSm ? 'contain' : 'cover'}+ quality={90}+ />+ </motion.div>+ }+ classname="md:!col-span-2 md:h-[350px] lg:h-[390px]"+ />+ <FeatureCard+ url={Solutions['realtime'].url}+ title={Solutions['realtime'].name}+ subtitle={+ <>+ Build multiplayer experiences+ <br className="inline-block sm:hidden lg:inline-block" /> with realtime data+ synchronization.+ </>+ }+ image={+ <motion.div className="absolute inset-0 z-0" variants={opacityVariant}>+ <Image+ src={+ isDarkMode+ ? '/images/index/realtime-dark.jpg'+ : '/images/index/realtime-light.jpg'+ }+ alt="Supabase Edge Functions feature, hover image with glow"+ layout="fill"+ objectPosition="50% 50%"+ objectFit="cover"+ quality={95}+ />+ </motion.div>+ }+ classname="md:!col-span-2 md:h-[350px] lg:h-[390px]"+ />+ </dl>+ <BackedBy className="pt-8" layout="horizontal" />+ </SectionContainer>+ )+}++export default Featuresdiff --git a/apps/www/components/Features/FeaturesOld.tsx b/apps/www/components/Features/FeaturesOld.tsxdeleted file mode 100644index 22dad3ee853..00000000000--- a/apps/www/components/Features/FeaturesOld.tsx+++ /dev/null@@ -1,88 +0,0 @@-import { Badge } from 'ui'-import Solutions from 'data/Solutions.json'-import Telemetry from '~/lib/telemetry'-import gaEvents from '~/lib/gaEvents'-import SectionContainer from '../Layouts/SectionContainer'-import ProductIcon from '../ProductIcon'-import TextLink from '../TextLink'-import { useTelemetryProps } from 'common/hooks/useTelemetryProps'-import { useRouter } from 'next/router'--const Features = () => {- const router = useRouter()- const telemetryProps = useTelemetryProps()-- const sendTelemetryEvent = async (product: any) => {- switch (product) {- case 'Database':- return await Telemetry.sendEvent(- gaEvents['www_hp_subhero_products_database'],- telemetryProps,- router- )- case 'Authentication':- return await Telemetry.sendEvent(- gaEvents['www_hp_subhero_products_auth'],- telemetryProps,- router- )- case 'Storage':- return await Telemetry.sendEvent(- gaEvents['www_hp_subhero_products_storage'],- telemetryProps,- router- )- case 'Edge Functions':- return await Telemetry.sendEvent(- gaEvents['www_hp_subhero_products_edgeFunctions'],- telemetryProps,- router- )- case 'Realtime':- return await Telemetry.sendEvent(- gaEvents['www_hp_subhero_products_realtime'],- telemetryProps,- router- )- }- }-- const IconSections = Object.values(Solutions).map((solution: any) => {- const { name, description, icon, label, url } = solution- if (solution.name === 'Realtime') return null- return (- <div key={name} className="mb-10 space-y-4 md:mb-0">- <div className="flex items-center">- <ProductIcon icon={icon} />- <dt className="text-scale-1200 ml-4 flex flex-row xl:flex-col">{name}</dt>- </div>-- <p className="p">{description}</p>-- {label && (- <div>- <Badge dot>{label}</Badge>- </div>- )}- {url && (- <TextLink- label={label ? 'Get notified' : 'Learn more'}- url={url}- onClick={() => sendTelemetryEvent(name)}- />- )}- </div>- )- })-- return (- <SectionContainer className="space-y-16 pb-0">- <h3 className="h3 text-center">Build faster and focus on your products</h3>- <dl className="grid grid-cols-1 gap-y-4 sm:grid-cols-2 md:grid-cols-2 md:gap-16 lg:grid-cols-4 lg:gap-x-8 xl:gap-x-24">- {IconSections}- </dl>- </SectionContainer>- )-}--export default Featuresdiff --git a/apps/www/components/Features/index.tsx b/apps/www/components/Features/index.tsxindex 8b63725e901..4af3829d6fe 100644--- a/apps/www/components/Features/index.tsx+++ b/apps/www/components/Features/index.tsx@@ -1,24 +1,12 @@+import { Badge } from 'ui'import Solutions from 'data/Solutions.json'import Telemetry from '~/lib/telemetry'import gaEvents from '~/lib/gaEvents'+import SectionContainer from '../Layouts/SectionContainer'+import ProductIcon from '../ProductIcon'+import TextLink from '../TextLink'import { useTelemetryProps } from 'common/hooks/useTelemetryProps'import { useRouter } from 'next/router'-import Image from 'next/image'-import SectionContainer from '../Layouts/SectionContainer'-import { motion } from 'framer-motion'-import BackedBy from '../BackedBy'-import { useBreakpoint, useTheme } from 'common'-import FeatureCard from './FeatureCard'-import DatabaseVisual from './DatabaseVisual'--const opacityVariant = {- default: { opacity: 1, filter: 'grayscale(1)', transition: { duration: 0.1 } },- hover: {- opacity: 1,- filter: 'grayscale(0)',- transition: { duration: 0.15 },- },-}const Features = () => {const router = useRouter()@@ -58,136 +46,41 @@ const Features = () => {)}}- const isSm = useBreakpoint(640)- const { isDarkMode } = useTheme()++ const IconSections = Object.values(Solutions).map((solution: any) => {+ const { name, description, icon, label, url } = solution++ return (+ <div key={name} className="mb-10 space-y-4 md:mb-0">+ <div className="flex items-center">+ <ProductIcon icon={icon} />+ <dt className="text-scale-1200 ml-4 flex flex-row xl:flex-col">{name}</dt>+ </div>++ <p className="p">{description}</p>++ {label && (+ <div>+ <Badge dot>{label}</Badge>+ </div>+ )}+ {url && (+ <TextLink+ label={label ? 'Get notified' : 'Learn more'}+ url={url}+ onClick={() => sendTelemetryEvent(name)}+ />+ )}+ </div>+ )+ })return (- <SectionContainer className="space-y-8 max-w-7xl mt-0 lg:mt-0 !pt-0">+ <SectionContainer className="space-y-16 pb-0"><h3 className="h3 text-center">Build faster and focus on your products</h3>- <dl className="grid grid-cols-1 gap-4 sm:grid-cols-2 md:gap-4 lg:gap-6 md:grid-cols-6">- <FeatureCard- url={Solutions['database'].url}- title={Solutions['database'].name}- subtitle={- <>- Every project is a full Postgres database,- <br className="inline-block sm:hidden lg:inline-block" /> the world's most trusted- relational database.- </>- }- onClick={() => sendTelemetryEvent(name)}- image={- <motion.div className="absolute inset-0 z-0" variants={opacityVariant}>- <DatabaseVisual isDarkMode={isDarkMode} />- </motion.div>- }- classname="col-span-full md:col-span-3"- />- <FeatureCard- url={Solutions['authentication'].url}- title={Solutions['authentication'].name}- subtitle={- <>- Add user sign ups and logins,- <br className="inline-block sm:hidden lg:inline-block" /> securing your data with Row- Level Security.- </>- }- image={- <motion.div className="absolute inset-0 z-0" variants={opacityVariant}>- <Image- src={isDarkMode ? '/images/index/auth-dark.jpg' : '/images/index/auth-light.jpg'}- alt="Supabase Authentication feature, hover image with glow"- layout="fill"- objectPosition="50% 50%"- objectFit="cover"- />- </motion.div>- }- classname="md:col-span-3 lg:!col-span-2"- onClick={() => sendTelemetryEvent(name)}- />- <FeatureCard- url={Solutions['storage'].url}- title={Solutions['storage'].name}- subtitle={- <>- Store, organize, and serve large files,- <br className="inline-block sm:hidden lg:inline-block" /> from videos to images.- </>- }- image={- <motion.div className="absolute inset-0 z-0" variants={opacityVariant}>- <Image- src={- isDarkMode ? '/images/index/storage-dark.jpg' : '/images/index/storage-light.jpg'- }- alt="Supabase Storage feature, hover image with glow"- layout="fill"- objectPosition="50% 50%"- objectFit="cover"- quality={95}- />- </motion.div>- }- classname="md:!col-span-2 md:h-[350px] lg:h-[390px]"- onClick={() => sendTelemetryEvent(name)}- />- <FeatureCard- url={Solutions['edge-functions'].url}- title={Solutions['edge-functions'].name}- subtitle={- <>- Easily write custom code- <br className="inline-block sm:hidden lg:inline-block" /> without deploying or scaling- servers.- </>- }- onClick={() => sendTelemetryEvent(name)}- image={- <motion.div className="absolute inset-0 z-0" variants={opacityVariant}>- <Image- src={isDarkMode ? '/images/index/edge-dark.jpg' : '/images/index/edge-light.jpg'}- alt="Supabase Edge Functions feature, hover image with glow"- layout="fill"- objectPosition={isSm ? 'bottom' : '50% 50%'}- objectFit={isSm ? 'contain' : 'cover'}- quality={90}- />- </motion.div>- }- classname="md:!col-span-2 md:h-[350px] lg:h-[390px]"- />- <FeatureCard- url={Solutions['realtime'].url}- title={Solutions['realtime'].name}- subtitle={- <>- Build multiplayer experiences- <br className="inline-block sm:hidden lg:inline-block" /> with realtime data- synchronization.- </>- }- image={- <motion.div className="absolute inset-0 z-0" variants={opacityVariant}>- <Image- src={- isDarkMode- ? '/images/index/realtime-dark.jpg'- : '/images/index/realtime-light.jpg'- }- alt="Supabase Edge Functions feature, hover image with glow"- layout="fill"- objectPosition="50% 50%"- objectFit="cover"- quality={95}- />- </motion.div>- }- classname="md:!col-span-2 md:h-[350px] lg:h-[390px]"- />+ <dl className="grid grid-cols-1 gap-y-4 sm:grid-cols-2 md:grid-cols-2 md:gap-16 xl:grid-cols-5 lg:gap-x-8 xl:gap-x-12">+ {IconSections}</dl>- <BackedBy className="pt-8" layout="horizontal" /></SectionContainer>)}diff --git a/apps/www/components/Hero/Hero.tsx b/apps/www/components/Hero/Hero.tsxindex 9bee2c1f5a0..d3882ebf747 100644--- a/apps/www/components/Hero/Hero.tsx+++ b/apps/www/components/Hero/Hero.tsx@@ -5,8 +5,7 @@ import { useTelemetryProps } from 'common/hooks/useTelemetryProps'import gaEvents from '~/lib/gaEvents'import { Button, IconBookOpen } from 'ui'import SectionContainer from '~/components/Layouts/SectionContainer'-// import HeroBackground from './HeroBackground'-import FrontendFrameworks from './FrontendFrameworks'+import HeroFrameworks from './HeroFrameworks'import styles from './hero.module.css'const Hero = () => {@@ -58,13 +57,13 @@ const Hero = () => {</a></Link></div>- <FrontendFrameworks className="mt-4 lg:mt-6" />+ <HeroFrameworks className="mt-4 lg:mt-6" /></div></div></div></div></SectionContainer>- {/* <HeroBackground /> */}+ <div className="w-1/2 container mx-auto h-px bg-gradient-to-r from-transparent via-scale-800 to-transparent" /></div>)}diff --git a/apps/www/components/Hero/HeroBackground.tsx b/apps/www/components/Hero/HeroBackground.tsxdeleted file mode 100644index 4eda303ba4e..00000000000--- a/apps/www/components/Hero/HeroBackground.tsx+++ /dev/null@@ -1,42 +0,0 @@-import React from 'react'-import dynamic from 'next/dynamic'-import styles from './hero.module.css'-import { useRouter } from 'next/router'--const HeroGrid = dynamic(() => import('./HeroGrid'))-const HeroGrid2 = dynamic(() => import('./HeroGrid2'))--const HeroBackground = () => {- const router = useRouter()- const isV1 = router.asPath === '/'- const isV2 = router.asPath === '/home-2'- console.log('router', router, isV1, isV2)-- return (- <>- <div- className={[- 'absolute z-[-4] flex flex-col top-0 left-0 w-screen h-screen overflow-hidden pointer-events-none',- ].join(' ')}- >- <div className="absolute bottom-0 z-[1] w-full h-1/3 bg-gradient-to-t from-scale-100 to-transparent" />- <div className="absolute top-0 z-[1] w-full h-3/5 bg-gradient-to-b from-scale-100 to-transparent" />- </div>- <div- className={[- 'absolute inset-0 w-full h-[600px] lg:h-[800px] overflow-hidden pointer-events-none',- styles['hero-container'],- ].join(' ')}- >- <div- className={['w-full h-full opacity-0 dark:opacity-60', styles['gradient']].join(' ')}- />- <div className="absolute bottom-0 z-[-2] w-full h-full bg-gradient-to-t from-scale-100 to-transparent" />- {isV1 && <HeroGrid />}- {isV2 && <HeroGrid2 />}- </div>- </>- )-}--export default HeroBackgrounddiff --git a/apps/www/components/Hero/FrontendFrameworks.tsx b/apps/www/components/Hero/HeroFrameworks.tsxsimilarity index 95%rename from apps/www/components/Hero/FrontendFrameworks.tsxrename to apps/www/components/Hero/HeroFrameworks.tsxindex 97fc55e5be1..00ce7babf2d 100644--- a/apps/www/components/Hero/FrontendFrameworks.tsx+++ b/apps/www/components/Hero/HeroFrameworks.tsx@@ -46,7 +46,7 @@ const frameworks = [},]-const FrontendFrameworks = ({ className }: { className?: string }) => {+const HeroFrameworks = ({ className }: { className?: string }) => {return (<div className={['flex text-center flex-col items-center', className].join(' ')}><small className="small !text-scale-1100">Works seamlessly with 20+ frameworks</small>@@ -79,4 +79,4 @@ const FrontendFrameworks = ({ className }: { className?: string }) => {)}-export default FrontendFrameworks+export default HeroFrameworksdiff --git a/apps/www/components/Hero/HeroGrid.tsx b/apps/www/components/Hero/HeroGrid.tsxdeleted file mode 100644index d55b3e05e85..00000000000--- a/apps/www/components/Hero/HeroGrid.tsx+++ /dev/null@@ -1,139 +0,0 @@-import React from 'react'-import { useBreakpoint, useTheme } from 'common'-import { motion } from 'framer-motion'--import styles from './hero.module.css'-import { useWindowSize } from 'react-use'--const HeroGrid = () => {- const { isDarkMode } = useTheme()- const { width } = useWindowSize()- const isSm = useBreakpoint(640)-- const svgGridOptions = {- color: isDarkMode ? '#00c6d4' : '#01876c',- boxWidth: width ? width * 7 : 7500,- boxHeight: width ? width * 5 : 6000,- xLines: isSm ? 20 : 49,- yLines: isSm ? 65 : 130,- strokeWidth: 1,- }-- const pulseAnimation = {- x2: [svgGridOptions.boxWidth / 2, 0, svgGridOptions.boxWidth / 2],- x1: [svgGridOptions.boxWidth / 2, 0, svgGridOptions.boxWidth / 2],- y1: [svgGridOptions.boxHeight, svgGridOptions.boxHeight / 3, 0],- y2: [svgGridOptions.boxHeight, svgGridOptions.boxHeight / 2, 0],- }-- const GridSVG = () => (- <svg- preserveAspectRatio="none"- width="100%"- height="100%"- viewBox={`0 0 ${svgGridOptions.boxWidth} ${svgGridOptions.boxHeight}`}- fill="none"- xmlns="http://www.w3.org/2000/svg"- >- {[...new Array(svgGridOptions.xLines)].map((_: any, i: number) => {- const x = (svgGridOptions.boxHeight * i) / svgGridOptions.xLines-- const AnimatedLine = ({ name }: { name: string }) => (- <line- x1={x}- y1={svgGridOptions.boxWidth}- x2={x}- y2="0"- stroke={`url(#${name})`}- strokeLinecap="round"- strokeWidth={isSm ? 3 : 6}- shapeRendering="crispEdges"- />- )-- const getMobileLines: () => string = () => {- switch (i) {- case 9:- return 'electric-pulse'- case 14:- return 'electric-pulse-2'- case 17:- return 'electric-pulse-3'- case 12:- return 'electric-pulse-4'- default:- return ''- }- }- const getDesktopLines: () => string = () => {- switch (i) {- case 25:- return 'electric-pulse'- case 33:- return 'electric-pulse-2'- case 22:- return 'electric-pulse-3'- case 30:- return 'electric-pulse-4'- case 36:- return 'electric-pulse-5'- default:- return ''- }- }-- return <AnimatedLine name={isSm ? getMobileLines() : getDesktopLines()} />- })}- <defs>- <MotionLinearGradient name="electric-pulse" delay={0} />- <MotionLinearGradient name="electric-pulse-2" delay={2} />- <MotionLinearGradient name="electric-pulse-3" delay={4} />- <MotionLinearGradient name="electric-pulse-4" delay={5} />- <MotionLinearGradient name="electric-pulse-5" delay={6} />- </defs>- </svg>- )-- const MotionLinearGradient = ({ name, delay }: { name: string; delay: number }) => (- <motion.linearGradient- animate={pulseAnimation}- transition={{- duration: isSm ? 4 : 5,- repeat: Infinity,- ease: 'linear',- delay: delay,- }}- id={name}- gradientUnits="userSpaceOnUse"- >- <stop stopColor={svgGridOptions.color} stopOpacity="0" />- <stop stopColor={svgGridOptions.color} stopOpacity="1" />- <stop offset="1" stopColor="#3E9BCF" stopOpacity="0" />- </motion.linearGradient>- )-- return (- <div- className={[- 'relative -z-10 ![perspective:800px] sm:![perspective:800px] md:![perspective:800px] lg:![perspective:800px]',- ].join(' ')}- >- <div- style={{- transform: 'rotateX(85deg)',- position: 'absolute',- top: 0,- bottom: 0,- left: 0,- right: 0,- }}- >- <div className={[styles['hero-grid-lines']].join(' ')}>- <GridSVG />- </div>- </div>- </div>- )-}--export default HeroGriddiff --git a/apps/www/components/Hero/HeroGrid2.tsx b/apps/www/components/Hero/HeroGrid2.tsxdeleted file mode 100644index cbef9edd3db..00000000000--- a/apps/www/components/Hero/HeroGrid2.tsx+++ /dev/null@@ -1,172 +0,0 @@-import React from 'react'-import { useBreakpoint, useTheme } from 'common'-import { motion } from 'framer-motion'--import styles from './hero.module.css'-import { useWindowSize } from 'react-use'--const HeroGrid2 = () => {- const { isDarkMode } = useTheme()- const { width } = useWindowSize()- const isSm = useBreakpoint(640)-- if (!width) return null-- const svgGridOptions = {- color: isDarkMode ? '#00c6d4' : '#01876c',- boxWidth: width ? width * 7 : 7500,- boxHeight: width ? width * 5 : 6000,- xLines: isSm ? 19 : 49,- yLines: isSm ? 65 : 60,- strokeWidth: 1,- }-- console.log('svgGridOptions', svgGridOptions)-- const pulseAnimation = {- x2: [svgGridOptions.boxWidth / 2, 0, svgGridOptions.boxWidth / 2],- x1: [svgGridOptions.boxWidth / 2, 0, svgGridOptions.boxWidth / 2],- y1: [svgGridOptions.boxHeight, svgGridOptions.boxHeight / 3, 0],- y2: [svgGridOptions.boxHeight, svgGridOptions.boxHeight / 2, 0],- }-- const GridSVG = () => (- <svg- preserveAspectRatio="none"- width="100%"- height="100%"- viewBox={`0 0 ${svgGridOptions.boxWidth ?? 600} ${svgGridOptions.boxHeight ?? 300}`}- fill="none"- xmlns="http://www.w3.org/2000/svg"- >- {[...new Array(svgGridOptions.yLines)].map((_: any, i: number) => {- const y = (svgGridOptions.boxWidth * i) / svgGridOptions.yLines- return (- <line- key={`y-${i}`}- x1={svgGridOptions.boxHeight}- y1={y}- x2="0"- y2={y}- stroke={svgGridOptions.color}- strokeWidth={svgGridOptions.strokeWidth}- shapeRendering="crispEdges"- />- )- })}- {[...new Array(svgGridOptions.xLines)].map((_: any, i: number) => {- const x = (svgGridOptions.boxHeight * i) / svgGridOptions.xLines-- const AnimatedLine = ({ name }: { name: string }) => (- <line- x1={x}- y1={svgGridOptions.boxWidth}- x2={x}- y2="0"- stroke={`url(#${name})`}- strokeLinecap="round"- strokeWidth={isSm ? 3 : 6}- shapeRendering="crispEdges"- />- )-- const getMobileLines: () => string = () => {- switch (i) {- case 9:- return 'electric-pulse'- case 14:- return 'electric-pulse-2'- case 17:- return 'electric-pulse-3'- case 12:- return 'electric-pulse-4'- default:- return ''- }- }- const getDesktopLines: () => string = () => {- switch (i) {- case 25:- return 'electric-pulse'- case 33:- return 'electric-pulse-2'- case 22:- return 'electric-pulse-3'- case 30:- return 'electric-pulse-4'- case 36:- return 'electric-pulse-5'- default:- return ''- }- }-- return (- <>- <line- key={`x-${i}`}- x1={x}- y1={svgGridOptions.boxWidth}- x2={x}- y2="0"- stroke={svgGridOptions.color}- strokeWidth={svgGridOptions.strokeWidth}- shapeRendering="crispEdges"- />- <AnimatedLine name={isSm ? getMobileLines() : getDesktopLines()} />- </>- )- })}- <defs>- <MotionLinearGradient name="electric-pulse" delay={0} />- <MotionLinearGradient name="electric-pulse-2" delay={2} />- <MotionLinearGradient name="electric-pulse-3" delay={4} />- <MotionLinearGradient name="electric-pulse-4" delay={5} />- <MotionLinearGradient name="electric-pulse-5" delay={6} />- </defs>- </svg>- )-- const MotionLinearGradient = ({ name, delay }: { name: string; delay: number }) => (- <motion.linearGradient- animate={pulseAnimation}- transition={{- duration: isSm ? 4 : 5,- repeat: Infinity,- ease: 'linear',- delay: delay,- }}- id={name}- gradientUnits="userSpaceOnUse"- >- <stop stopColor={svgGridOptions.color} stopOpacity="0" />- <stop stopColor={svgGridOptions.color} stopOpacity="1" />- <stop offset="1" stopColor="#3E9BCF" stopOpacity="0" />- </motion.linearGradient>- )-- return (- <div- className={[- 'relative -z-10 ![perspective:1500px] sm:![perspective:1500px] md:![perspective:1500px] lg:![perspective:1500px]',- ].join(' ')}- >- <div- style={{- transform: 'rotateX(75deg)',- position: 'absolute',- top: 0,- bottom: 0,- left: 0,- right: 0,- }}- >- <div className={[styles['hero-grid-lines']].join(' ')}>- <GridSVG />- </div>- </div>- </div>- )-}--export default HeroGrid2diff --git a/apps/www/components/Hero/hero.module.css b/apps/www/components/Hero/hero.module.cssindex 24cc50daf25..f8e4fb0a77b 100644--- a/apps/www/components/Hero/hero.module.css+++ b/apps/www/components/Hero/hero.module.css@@ -1,40 +1,9 @@-.hero-container {- z-index: -6;- transition: perspective 3s ease 0s;-}-.hero-text {opacity: 0;transform: translate3d(0, 10px, 0);animation: animateText 1s cubic-bezier(0.25, 0.25, 0, 1) 0.1s both;}-.hero-grid-lines {- position: absolute;- width: 120vw;- height: 120vh;- min-height: 800px;- transform: translateY(20%);- overflow: hidden;- display: flex;- align-items: center;- justify-content: center;- inset: 0;- margin: 0 auto;-}--.gradient {- position: absolute;- user-select: none;- pointer-events: none;- inset: 0px;- z-index: -3;- filter: blur(140px);- transform: translateZ(0px);- background: radial-gradient(ellipse 50% 60% at 50% 70%, #3ecf8e, transparent),- radial-gradient(ellipse 70% 80% at 50% 50%, #1d7a50, transparent);-}-@keyframes animateText {to {opacity: 1;diff --git a/apps/www/pages/home-2.tsx b/apps/www/pages/home-2.tsxdeleted file mode 100644index dd4a56dca05..00000000000--- a/apps/www/pages/home-2.tsx+++ /dev/null@@ -1,45 +0,0 @@-import dynamic from 'next/dynamic'-import { getSortedPosts } from '~/lib/posts'-import PostTypes from '~/types/post'-import Layout from '~/components/Layouts/Default'-import Hero from '~/components/Hero/Hero'--// Import Swiper styles if swiper used on page-import 'swiper/swiper.min.css'--const FeaturesOld = dynamic(() => import('components/Features/FeaturesOld'))-const BuiltExamples = dynamic(() => import('components/BuiltWithSupabase/index'))-const MadeForDevelopers = dynamic(() => import('components/MadeForDevelopers/index'))-const AdminAccess = dynamic(() => import('components/AdminAccess/index'))-const CTABanner = dynamic(() => import('components/CTABanner/index'))-const CustomerStories = dynamic(() => import('components/CustomerStories'))-const TwitterSocialSection = dynamic(() => import('~/components/TwitterSocialSection'))--type Props = { customerStories: PostTypes[] }--const Index = ({ customerStories }: Props) => {- return (- <Layout>- <Hero />- <FeaturesOld />- <TwitterSocialSection />- <BuiltExamples />- <MadeForDevelopers />- <AdminAccess />- <CustomerStories customerStories={customerStories} />- <CTABanner />- </Layout>- )-}--export async function getStaticProps() {- const customerStories = getSortedPosts('_customers', 3)-- return {- props: {- customerStories,- },- }-}--export default Indexdiff --git a/apps/www/pages/index.tsx b/apps/www/pages/index.tsxindex 1333f0e7e96..6eef17f9fc3 100644--- a/apps/www/pages/index.tsx+++ b/apps/www/pages/index.tsx@@ -7,7 +7,7 @@ import Hero from '~/components/Hero/Hero'// Import Swiper styles if swiper used on pageimport 'swiper/swiper.min.css'-const Features = dynamic(() => import('components/Features/index'))+const Features = dynamic(() => import('~/components/Features/index'))const BuiltExamples = dynamic(() => import('components/BuiltWithSupabase/index'))const MadeForDevelopers = dynamic(() => import('components/MadeForDevelopers/index'))const AdminAccess = dynamic(() => import('components/AdminAccess/index'))