From 5fe10a15948ea2eecf3cb0169beadcc91131ee09 Mon Sep 17 00:00:00 2001 From: Ivan Vasilov Date: Tue, 4 Nov 2025 12:21:22 +0100 Subject: [PATCH] Fixes for www. --- .../www/components/Enterprise/Performance.tsx | 6 ++-- apps/www/components/Enterprise/Security.tsx | 16 +++++------ apps/www/components/Enterprise/Support.tsx | 6 ++-- apps/www/components/Enterprise/UseCases.tsx | 15 +++++----- apps/www/components/EnterpriseFormQuotes.tsx | 8 +++--- apps/www/components/Globe.tsx | 6 ++-- .../LaunchWeek/15/LW15MainStage.tsx | 26 ++++++++--------- .../15/Ticketing/LW15TicketShare.tsx | 6 ++-- .../Modules/Cron/CronSQLSection.tsx | 11 ++++---- .../Modules/Queues/QueuesAPISection.tsx | 10 +++---- .../Modules/Queues/QueuesSQLSection.tsx | 10 +++---- .../components/Pricing/PricingAddOnTable.tsx | 6 ++-- .../Products/VectorAI/DeployGlobally.tsx | 4 +-- .../Products/VectorAI/PGvectorImg.tsx | 8 +++--- .../VectorAI/SecureAndScalableImg.tsx | 6 ++-- .../components/Sections/FeaturesSection.tsx | 2 +- .../Sections/ImageParagraphSection.tsx | 8 +++--- .../components/Sections/ParagraphSection.tsx | 2 +- apps/www/components/Sections/SingleQuote.tsx | 6 ++-- .../Sections/TimedAccordionSection.tsx | 10 +++---- .../components/Sections/TimedTabsSection.tsx | 6 ++-- .../components/Solutions/ResultsSection.tsx | 6 ++-- apps/www/components/Solutions/Videos.tsx | 6 ++-- .../components/Supasquad/PerfectTiming.tsx | 6 ++-- apps/www/data/MainProducts.tsx | 3 +- .../contributing/supasquad.utils.tsx | 28 +++++++++---------- apps/www/data/solutions/solutions.utils.tsx | 26 ++++++++--------- apps/www/pages/assistant.tsx | 6 ++-- .../pages/partners/integrations/[slug].tsx | 2 +- 29 files changed, 130 insertions(+), 131 deletions(-) diff --git a/apps/www/components/Enterprise/Performance.tsx b/apps/www/components/Enterprise/Performance.tsx index abffa0336dc..c8515cf3ee4 100644 --- a/apps/www/components/Enterprise/Performance.tsx +++ b/apps/www/components/Enterprise/Performance.tsx @@ -1,12 +1,12 @@ -import React, { FC } from 'react' +import { FC, ReactElement } from 'react' import SectionContainer from '~/components/Layouts/SectionContainer' import UsersGrowthChart from '~/components/UsersGrowthChart' interface Props { id: string - heading: string | JSX.Element - subheading: string | JSX.Element + heading: string | ReactElement + subheading: string | ReactElement highlights: Highlight[] } diff --git a/apps/www/components/Enterprise/Security.tsx b/apps/www/components/Enterprise/Security.tsx index 825ee023d5b..65d7b812e1a 100644 --- a/apps/www/components/Enterprise/Security.tsx +++ b/apps/www/components/Enterprise/Security.tsx @@ -1,14 +1,14 @@ -import React, { FC } from 'react' -import { TextLink } from 'ui' -import SectionContainer from '~/components/Layouts/SectionContainer' - import type { LucideIcon } from 'lucide-react' +import { FC, ReactElement } from 'react' +import { TextLink } from 'ui' + +import SectionContainer from '~/components/Layouts/SectionContainer' export interface SecuritySectionProps { id: string - label: string | JSX.Element - heading: string | JSX.Element - subheading: string | JSX.Element + label: string | ReactElement + heading: string | ReactElement + subheading: string | ReactElement features: FeatureProps[] cta: { label: string @@ -19,7 +19,7 @@ export interface SecuritySectionProps { export type Story = { url: string heading: string - subheading: string | JSX.Element + subheading: string | ReactElement } type FeatureProps = { diff --git a/apps/www/components/Enterprise/Support.tsx b/apps/www/components/Enterprise/Support.tsx index 9b6adae1634..b5cb1ebb199 100644 --- a/apps/www/components/Enterprise/Support.tsx +++ b/apps/www/components/Enterprise/Support.tsx @@ -1,4 +1,4 @@ -import React, { FC } from 'react' +import { FC, ReactElement } from 'react' import { cn } from 'ui' import SectionContainer from '~/components/Layouts/SectionContainer' @@ -7,8 +7,8 @@ import type { LucideIcon } from 'lucide-react' interface Props { id: string - label?: string | JSX.Element - heading: string | JSX.Element + label?: string | ReactElement + heading: string | ReactElement features: Feature[] } diff --git a/apps/www/components/Enterprise/UseCases.tsx b/apps/www/components/Enterprise/UseCases.tsx index d37b7819b37..6f698ee1a03 100644 --- a/apps/www/components/Enterprise/UseCases.tsx +++ b/apps/www/components/Enterprise/UseCases.tsx @@ -1,20 +1,19 @@ import 'swiper/css' -import React, { FC } from 'react' -import { Swiper, SwiperSlide } from 'swiper/react' +import type { LucideIcon } from 'lucide-react' +import Image from 'next/image' import Link from 'next/link' +import { FC, ReactElement } from 'react' +import { Swiper, SwiperSlide } from 'swiper/react' import { TextLink } from 'ui' import SectionContainer from '~/components/Layouts/SectionContainer' import Panel from '~/components/Panel' -import type { LucideIcon } from 'lucide-react' -import Image from 'next/image' - interface Props { id: string - label?: string | JSX.Element - heading?: string | JSX.Element + label?: string | ReactElement + heading?: string | ReactElement stories?: Story[] highlights?: Highlight[] } @@ -24,7 +23,7 @@ export type Story = { url: string target?: '_blank' | string heading?: string - subheading?: string | JSX.Element + subheading?: string | ReactElement } type Highlight = { diff --git a/apps/www/components/EnterpriseFormQuotes.tsx b/apps/www/components/EnterpriseFormQuotes.tsx index 9a765d2b442..dc1fa750391 100644 --- a/apps/www/components/EnterpriseFormQuotes.tsx +++ b/apps/www/components/EnterpriseFormQuotes.tsx @@ -1,9 +1,9 @@ -import { useEffect, useState } from 'react' import { AnimatePresence, motion, useAnimation } from 'framer-motion' +import { ReactElement, useEffect, useState } from 'react' import { cn } from 'ui' interface TabProps { - label: string | JSX.Element + label: string | ReactElement isActive: boolean onClick: VoidFunction } @@ -22,9 +22,9 @@ const Tab = ({ isActive, label, onClick }: TabProps) => ( ) interface Tab { - label: string | JSX.Element + label: string | ReactElement paragraph?: string - panel: JSX.Element + panel: ReactElement } interface Props { diff --git a/apps/www/components/Globe.tsx b/apps/www/components/Globe.tsx index 2303317b2c7..57a8efcb7fd 100644 --- a/apps/www/components/Globe.tsx +++ b/apps/www/components/Globe.tsx @@ -1,11 +1,11 @@ import createGlobe from 'cobe' -import { useCallback, useEffect, useRef } from 'react' -import { useTheme } from 'next-themes' import { debounce } from 'lib/helpers' +import { useTheme } from 'next-themes' +import { useCallback, useEffect, useRef } from 'react' const Globe = () => { const { resolvedTheme } = useTheme() - const canvasRef = useRef() + const canvasRef = useRef(null) let rotation: number = 0 let width: number = 0 diff --git a/apps/www/components/LaunchWeek/15/LW15MainStage.tsx b/apps/www/components/LaunchWeek/15/LW15MainStage.tsx index 37cc3ed75c2..489eb540af9 100644 --- a/apps/www/components/LaunchWeek/15/LW15MainStage.tsx +++ b/apps/www/components/LaunchWeek/15/LW15MainStage.tsx @@ -1,21 +1,21 @@ -import 'swiper/css' -import 'swiper/css/a11y' -import 'swiper/css/navigation' -import 'swiper/css/controller' -import React, { useEffect, useRef, useState } from 'react' +import { useTheme } from 'next-themes' import Image from 'next/image' import Link from 'next/link' -import { Button, cn } from 'ui' -import { useTheme } from 'next-themes' +import React, { useEffect, useRef, useState } from 'react' +import 'swiper/css' +import 'swiper/css/a11y' +import 'swiper/css/controller' +import 'swiper/css/navigation' +import { A11y, Controller, Navigation } from 'swiper/modules' import { Swiper, SwiperClass, SwiperRef, SwiperSlide } from 'swiper/react' -import { Controller, Navigation, A11y } from 'swiper/modules' +import { Button, cn } from 'ui' -import SectionContainer from 'components/Layouts/SectionContainer' -import { mainDays, WeekDayProps } from './data' -import { useWindowSize } from 'react-use' import { useBreakpoint } from 'common' -import { DayLink } from './lw15.components' +import SectionContainer from 'components/Layouts/SectionContainer' import { ChevronLeft, ChevronRight } from 'lucide-react' +import { useWindowSize } from 'react-use' +import { mainDays, WeekDayProps } from './data' +import { DayLink } from './lw15.components' const LW15MainStage = ({ className }: { className?: string }) => { const { resolvedTheme } = useTheme() @@ -181,7 +181,7 @@ const CardBG = ({ day }: { day: WeekDayProps }) => ( interface Props { className?: string slides: WeekDayProps[] - swiperRef: React.RefObject + swiperRef: React.RefObject setControlledSwiper: (swiper: SwiperClass) => void controlledSwiper: SwiperClass | null } diff --git a/apps/www/components/LaunchWeek/15/Ticketing/LW15TicketShare.tsx b/apps/www/components/LaunchWeek/15/Ticketing/LW15TicketShare.tsx index 7209d908ae4..99d699e278e 100644 --- a/apps/www/components/LaunchWeek/15/Ticketing/LW15TicketShare.tsx +++ b/apps/www/components/LaunchWeek/15/Ticketing/LW15TicketShare.tsx @@ -5,8 +5,8 @@ import { useTheme } from 'next-themes' import Link from 'next/link' import { useEffect, useRef, useState } from 'react' import { Button } from 'ui' -import useConfData from '../hooks/use-conf-data' import { LW15_TWEET_TEXT, LW15_URL } from '~/lib/constants' +import useConfData from '../hooks/use-conf-data' import supabase from '../supabase' export default function LW15TicketShare() { @@ -17,7 +17,7 @@ export default function LW15TicketShare() { const [_imgReady, setImgReady] = useState(false) const [_loading, setLoading] = useState(false) const isLessThanMd = useBreakpoint() - const downloadLink = useRef() + const downloadLink = useRef(null) const link = `${LW15_URL}/tickets/${username}?lw=15&t=${dayjs(new Date()).format('DHHmmss')}` const permalink = encodeURIComponent(link) const text = LW15_TWEET_TEXT @@ -38,7 +38,7 @@ export default function LW15TicketShare() { setLoading(false) if (downloadLink.current) { downloadLink.current.click() - downloadLink.current = undefined + downloadLink.current = null } } }, [downloadUrl]) diff --git a/apps/www/components/Modules/Cron/CronSQLSection.tsx b/apps/www/components/Modules/Cron/CronSQLSection.tsx index d7023d0d793..2da89c73bb1 100644 --- a/apps/www/components/Modules/Cron/CronSQLSection.tsx +++ b/apps/www/components/Modules/Cron/CronSQLSection.tsx @@ -1,9 +1,8 @@ -import React, { FC } from 'react' -import type { LucideIcon } from 'lucide-react' +import { FC, type ReactElement } from 'react' import { cn, TextLink } from 'ui' -import SectionContainer from '~/components/Layouts/SectionContainer' import CodeWindow from '~/components/CodeWindow' +import SectionContainer from '~/components/Layouts/SectionContainer' const codeSnippet = ` select @@ -15,9 +14,9 @@ select ` interface Props { id: string - label: string | JSX.Element - heading: string | JSX.Element - subheading: string | JSX.Element + label: string | ReactElement + heading: string | ReactElement + subheading: string | ReactElement className?: string cta?: { label: string diff --git a/apps/www/components/Modules/Queues/QueuesAPISection.tsx b/apps/www/components/Modules/Queues/QueuesAPISection.tsx index aa6d3761d2e..fa11c1c9548 100644 --- a/apps/www/components/Modules/Queues/QueuesAPISection.tsx +++ b/apps/www/components/Modules/Queues/QueuesAPISection.tsx @@ -1,8 +1,8 @@ -import React, { FC } from 'react' +import { FC, ReactElement } from 'react' import { cn, TextLink } from 'ui' -import SectionContainer from '~/components/Layouts/SectionContainer' import CodeWindow from '~/components/CodeWindow' +import SectionContainer from '~/components/Layouts/SectionContainer' const codeSnippet = `const queues = createClient(supabaseUrl, supabaseKey, { db: { schema: "pgmq_public" }, @@ -21,9 +21,9 @@ const message = await queues.rpc("pop", { interface Props { id: string - label: string | JSX.Element - heading: string | JSX.Element - subheading: string | JSX.Element + label: string | ReactElement + heading: string | ReactElement + subheading: string | ReactElement className?: string cta?: { label: string diff --git a/apps/www/components/Modules/Queues/QueuesSQLSection.tsx b/apps/www/components/Modules/Queues/QueuesSQLSection.tsx index e99680ca5e5..15ae9ef887c 100644 --- a/apps/www/components/Modules/Queues/QueuesSQLSection.tsx +++ b/apps/www/components/Modules/Queues/QueuesSQLSection.tsx @@ -1,8 +1,8 @@ -import React, { FC } from 'react' +import { FC, ReactElement } from 'react' import { cn, TextLink } from 'ui' -import SectionContainer from '~/components/Layouts/SectionContainer' import CodeWindow from '~/components/CodeWindow' +import SectionContainer from '~/components/Layouts/SectionContainer' const codeSnippet = ` select pgmq.create('my_special_queue'); @@ -16,9 +16,9 @@ select * from pgmq.pop('my_special_queue'); ` interface Props { id: string - label: string | JSX.Element - heading: string | JSX.Element - subheading: string | JSX.Element + label: string | ReactElement + heading: string | ReactElement + subheading: string | ReactElement className?: string cta?: { label: string diff --git a/apps/www/components/Pricing/PricingAddOnTable.tsx b/apps/www/components/Pricing/PricingAddOnTable.tsx index df99dcd555d..bd2c413cd61 100644 --- a/apps/www/components/Pricing/PricingAddOnTable.tsx +++ b/apps/www/components/Pricing/PricingAddOnTable.tsx @@ -1,8 +1,8 @@ import classNames from 'classnames' -import { Fragment, useMemo, useState } from 'react' +import { ChevronUp } from 'lucide-react' +import { Fragment, ReactElement, useMemo, useState } from 'react' import { Collapsible } from 'ui' import { Check } from './PricingIcons' -import { ChevronUp } from 'lucide-react' interface PricingAddOnTableProps { pricing: { @@ -16,7 +16,7 @@ interface PricingAddOnTableProps { }[] }[] } - icon: JSX.Element + icon: ReactElement } const PricingAddOnTable = ({ icon, pricing }: PricingAddOnTableProps) => { diff --git a/apps/www/components/Products/VectorAI/DeployGlobally.tsx b/apps/www/components/Products/VectorAI/DeployGlobally.tsx index 5ebf98222b0..5e05acfad63 100644 --- a/apps/www/components/Products/VectorAI/DeployGlobally.tsx +++ b/apps/www/components/Products/VectorAI/DeployGlobally.tsx @@ -1,5 +1,5 @@ -import React from 'react' import { useTheme } from 'next-themes' +import React, { useRef } from 'react' function getRandomNumber(min: number, max: number) { var range = max - min @@ -10,7 +10,7 @@ function getRandomNumber(min: number, max: number) { const DeployGlobally = ({ isHovered }: { isHovered: boolean }) => { const { resolvedTheme } = useTheme() - const ref = React.useRef() + const ref = useRef(null) const states = ['1', '2', '3'] const colors = { green: resolvedTheme?.includes('dark') ? '#1CF7C3' : '#00B99F', diff --git a/apps/www/components/Products/VectorAI/PGvectorImg.tsx b/apps/www/components/Products/VectorAI/PGvectorImg.tsx index b0ca7128020..82edf7625cd 100644 --- a/apps/www/components/Products/VectorAI/PGvectorImg.tsx +++ b/apps/www/components/Products/VectorAI/PGvectorImg.tsx @@ -1,11 +1,11 @@ -import React, { useEffect, useRef } from 'react' -import { useTheme } from 'next-themes' -import { DEFAULT_EASE } from '~/lib/animations' import { LazyMotion, domAnimation, m } from 'framer-motion' +import { useTheme } from 'next-themes' +import { useEffect, useRef } from 'react' +import { DEFAULT_EASE } from '~/lib/animations' const PGvectorImg = ({ isHovered }: { isHovered: boolean }) => { const { resolvedTheme } = useTheme() - const svgRef = useRef() + const svgRef = useRef(null) const colors = { circles1: resolvedTheme?.includes('dark') ? '#105C3B' : '#008B4F', diff --git a/apps/www/components/Products/VectorAI/SecureAndScalableImg.tsx b/apps/www/components/Products/VectorAI/SecureAndScalableImg.tsx index 3683c2c68ad..71028bf0999 100644 --- a/apps/www/components/Products/VectorAI/SecureAndScalableImg.tsx +++ b/apps/www/components/Products/VectorAI/SecureAndScalableImg.tsx @@ -1,11 +1,11 @@ -import React, { useEffect, useRef } from 'react' import { useTheme } from 'next-themes' +import { useEffect, useRef } from 'react' import { DEFAULT_EASE } from '~/lib/animations' const SecureAndScalableImg = ({ isHovered }: { isHovered: boolean }) => { const { resolvedTheme } = useTheme() - const shieldsRef = useRef() - const mainRef = useRef() + const shieldsRef = useRef(null) + const mainRef = useRef(null) const colors = { shieldsStroke: resolvedTheme?.includes('dark') ? '#494949' : '#D5D5D5', diff --git a/apps/www/components/Sections/FeaturesSection.tsx b/apps/www/components/Sections/FeaturesSection.tsx index 22d801188bc..d4a515abdc3 100644 --- a/apps/www/components/Sections/FeaturesSection.tsx +++ b/apps/www/components/Sections/FeaturesSection.tsx @@ -2,7 +2,7 @@ import { LazyMotion, domAnimation, m, useInView } from 'framer-motion' import { ArrowUpRight } from 'lucide-react' import Link from 'next/link' import { ReactNode, useRef } from 'react' -import { ReactMarkdown } from 'react-markdown/lib/react-markdown' +import ReactMarkdown from 'react-markdown' import { Button, cn } from 'ui' import SectionContainer from '~/components/Layouts/SectionContainer' import { INITIAL_BOTTOM, getAnimation } from '~/lib/animations' diff --git a/apps/www/components/Sections/ImageParagraphSection.tsx b/apps/www/components/Sections/ImageParagraphSection.tsx index 1c856a84c04..3e8f484168e 100644 --- a/apps/www/components/Sections/ImageParagraphSection.tsx +++ b/apps/www/components/Sections/ImageParagraphSection.tsx @@ -1,13 +1,13 @@ -import React, { FC } from 'react' +import { FC, ReactElement } from 'react' import { cn, TextLink } from 'ui' import SectionContainer from '~/components/Layouts/SectionContainer' interface Props { id: string - label: string | JSX.Element - heading: string | JSX.Element - subheading: string | JSX.Element + label: string | ReactElement + heading: string | ReactElement + subheading: string | ReactElement image?: any className?: string cta?: { diff --git a/apps/www/components/Sections/ParagraphSection.tsx b/apps/www/components/Sections/ParagraphSection.tsx index 067997fa61f..8e354846ab7 100644 --- a/apps/www/components/Sections/ParagraphSection.tsx +++ b/apps/www/components/Sections/ParagraphSection.tsx @@ -1,7 +1,7 @@ import { ArrowUpRight } from 'lucide-react' import Link from 'next/link' import { ReactNode } from 'react' -import { ReactMarkdown } from 'react-markdown/lib/react-markdown' +import ReactMarkdown from 'react-markdown' import { Button, cn } from 'ui' import SectionContainer from '~/components/Layouts/SectionContainer' diff --git a/apps/www/components/Sections/SingleQuote.tsx b/apps/www/components/Sections/SingleQuote.tsx index 86d11bef765..698473fb4c7 100644 --- a/apps/www/components/Sections/SingleQuote.tsx +++ b/apps/www/components/Sections/SingleQuote.tsx @@ -1,5 +1,5 @@ import Link from 'next/link' -import React, { FC } from 'react' +import { FC, ReactElement } from 'react' import { cn } from 'ui' import SectionContainer from '~/components/Layouts/SectionContainer' @@ -17,9 +17,9 @@ interface Props { type Quote = { text: string author: string - logo?: string | JSX.Element + logo?: string | ReactElement role: string - avatar?: string | JSX.Element + avatar?: string | ReactElement link?: string } diff --git a/apps/www/components/Sections/TimedAccordionSection.tsx b/apps/www/components/Sections/TimedAccordionSection.tsx index 178835e1a7b..60f5c2aaea1 100644 --- a/apps/www/components/Sections/TimedAccordionSection.tsx +++ b/apps/www/components/Sections/TimedAccordionSection.tsx @@ -1,10 +1,10 @@ import 'swiper/css' -import React, { useState, useEffect, useRef } from 'react' -import { LazyMotion, domAnimation, m, useAnimation, useInView } from 'framer-motion' -import { cn } from 'ui' -import { Swiper, SwiperSlide } from 'swiper/react' import { useBreakpoint } from 'common' +import { LazyMotion, domAnimation, m, useAnimation, useInView } from 'framer-motion' +import React, { ReactElement, useEffect, useRef, useState } from 'react' +import { Swiper, SwiperSlide } from 'swiper/react' +import { cn } from 'ui' interface TabProps { label: string | React.ReactNode @@ -68,7 +68,7 @@ const Tab = ({ isActive, label, paragraph, onClick, progress, intervalDuration } interface Tab { label: string | React.ReactNode paragraph?: string | React.ReactNode - panel?: JSX.Element + panel?: ReactElement code?: string } diff --git a/apps/www/components/Sections/TimedTabsSection.tsx b/apps/www/components/Sections/TimedTabsSection.tsx index 837bc073f46..504bd8fcd5b 100644 --- a/apps/www/components/Sections/TimedTabsSection.tsx +++ b/apps/www/components/Sections/TimedTabsSection.tsx @@ -1,14 +1,14 @@ import 'swiper/css' import { AnimatePresence, motion, useAnimation } from 'framer-motion' +import { ArrowUpRight } from 'lucide-react' import Image from 'next/image' import Link from 'next/link' -import { ReactNode, useEffect, useState } from 'react' +import { ReactElement, ReactNode, useEffect, useState } from 'react' import { Swiper, SwiperSlide } from 'swiper/react' import { Button } from 'ui' import CodeBlock from '~/components/CodeBlock/CodeBlock' import SectionContainer from '~/components/Layouts/SectionContainer' -import { ArrowUpRight } from 'lucide-react' interface TabProps { label: string @@ -58,7 +58,7 @@ const Tab = ({ isActive, label, paragraph, onClick, progress, intervalDuration } interface Tab { label: string paragraph?: string - panel?: JSX.Element + panel?: ReactElement colabUrl: string code?: string } diff --git a/apps/www/components/Solutions/ResultsSection.tsx b/apps/www/components/Solutions/ResultsSection.tsx index 1681cf75062..4a5aa00fc2a 100644 --- a/apps/www/components/Solutions/ResultsSection.tsx +++ b/apps/www/components/Solutions/ResultsSection.tsx @@ -1,12 +1,12 @@ -import React, { FC } from 'react' +import { FC, ReactElement } from 'react' import SectionContainer from '~/components/Layouts/SectionContainer' import UsersGrowthChart from '~/components/UsersGrowthChart' export interface ResultsSectionProps { id: string - heading: string | JSX.Element - subheading: string | JSX.Element + heading: string | ReactElement + subheading: string | ReactElement highlights: Highlight[] } diff --git a/apps/www/components/Solutions/Videos.tsx b/apps/www/components/Solutions/Videos.tsx index 8ab98a0b2b5..70d1cc7b753 100644 --- a/apps/www/components/Solutions/Videos.tsx +++ b/apps/www/components/Solutions/Videos.tsx @@ -1,13 +1,13 @@ -import React, { FC } from 'react' +import { FC, ReactElement } from 'react' import SectionContainer from '~/components/Layouts/SectionContainer' -import Panel from '../Panel' import type { Testimonials } from '~/data/solutions/solutions.utils' +import Panel from '../Panel' export type Story = { url: string heading: string - subheading: string | JSX.Element + subheading: string | ReactElement } const EnterpriseSecurity: FC = (props) => { diff --git a/apps/www/components/Supasquad/PerfectTiming.tsx b/apps/www/components/Supasquad/PerfectTiming.tsx index 5f2ebba74c0..fe0c39566c2 100644 --- a/apps/www/components/Supasquad/PerfectTiming.tsx +++ b/apps/www/components/Supasquad/PerfectTiming.tsx @@ -1,12 +1,12 @@ -import React, { FC } from 'react' +import { FC, ReactElement } from 'react' import SectionContainer from '~/components/Layouts/SectionContainer' import UsersGrowthChart from '~/components/UsersGrowthChart' export interface PerfectTimingProps { id: string - heading: string | JSX.Element - subheading: string | JSX.Element + heading: string | ReactElement + subheading: string | ReactElement highlights: Highlight[] } diff --git a/apps/www/data/MainProducts.tsx b/apps/www/data/MainProducts.tsx index 9a05d1cac67..cdd9dd57128 100644 --- a/apps/www/data/MainProducts.tsx +++ b/apps/www/data/MainProducts.tsx @@ -1,3 +1,4 @@ +import { ReactElement } from 'react' import { products } from 'shared-data' import { PRODUCT_NAMES, PRODUCT_SHORTNAMES } from 'shared-data/products' @@ -5,7 +6,7 @@ export type ProductType = { [key: string]: { name: string icon: string - description: string | JSX.Element + description: string | ReactElement description_short: string label: string url: string diff --git a/apps/www/data/open-source/contributing/supasquad.utils.tsx b/apps/www/data/open-source/contributing/supasquad.utils.tsx index 57b883f6201..7d8c6949569 100644 --- a/apps/www/data/open-source/contributing/supasquad.utils.tsx +++ b/apps/www/data/open-source/contributing/supasquad.utils.tsx @@ -1,7 +1,7 @@ import { useBreakpoint } from 'common' import { LucideIcon } from 'lucide-react' import Link from 'next/link' -import type { ComponentType, SVGProps } from 'react' +import type { ComponentType, ReactElement, SVGProps } from 'react' import { cn } from 'ui' import z from 'zod' @@ -43,9 +43,9 @@ export interface Metadata { export interface HeroSection { id: string title: string - h1: JSX.Element - subheader: JSX.Element[] - image: JSX.Element + h1: ReactElement + subheader: ReactElement[] + image: ReactElement className?: string sectionContainerClassName?: string icon?: string @@ -66,7 +66,7 @@ export interface Quote { icon?: string author: string authorTitle?: string - quote: JSX.Element + quote: ReactElement avatar: string } @@ -77,8 +77,8 @@ export interface Quotes { export interface Highlight { icon?: IconType - heading: string | JSX.Element - subheading: string | JSX.Element + heading: string | ReactElement + subheading: string | ReactElement url?: string } @@ -86,16 +86,16 @@ export interface Feature { id?: string icon?: string iconNoStroke?: boolean - heading: string | JSX.Element - subheading: string | JSX.Element - img?: JSX.Element + heading: string | ReactElement + subheading: string | ReactElement + img?: ReactElement } export interface FeaturesSection { id: string label?: string - heading: JSX.Element - subheading?: string | JSX.Element + heading: ReactElement + subheading?: string | ReactElement features: Feature[] className?: string // { @@ -106,7 +106,7 @@ export interface FeaturesSection { export interface Testimonials { id: string label: string - heading: JSX.Element + heading: ReactElement videos: { [key: string]: { url: string @@ -117,7 +117,7 @@ export interface Testimonials { export interface CTASection { id: string label: string - heading: JSX.Element | string + heading: ReactElement | string subheading: string cta: { label: string diff --git a/apps/www/data/solutions/solutions.utils.tsx b/apps/www/data/solutions/solutions.utils.tsx index a80b0ba41b6..2b9056e868a 100644 --- a/apps/www/data/solutions/solutions.utils.tsx +++ b/apps/www/data/solutions/solutions.utils.tsx @@ -1,7 +1,7 @@ import { useBreakpoint } from 'common' import { LucideIcon } from 'lucide-react' import Link from 'next/link' -import type { ComponentType, SVGProps } from 'react' +import type { ComponentType, ReactElement, SVGProps } from 'react' import { cn } from 'ui' export type HeroIcon = ComponentType> @@ -15,9 +15,9 @@ export interface Metadata { export interface HeroSection { id: string title: string - h1: JSX.Element - subheader: JSX.Element[] - image: JSX.Element | undefined + h1: ReactElement + subheader: ReactElement[] + image: ReactElement | undefined className?: string sectionContainerClassName?: string icon?: string @@ -38,7 +38,7 @@ export interface Quote { icon?: string author: string authorTitle?: string - quote: JSX.Element + quote: ReactElement avatar: string } @@ -49,8 +49,8 @@ export interface Quotes { export interface Highlight { icon?: IconType - heading: string | JSX.Element - subheading: string | JSX.Element + heading: string | ReactElement + subheading: string | ReactElement url?: string } @@ -58,15 +58,15 @@ export interface Feature { id?: string icon?: IconType | string iconNoStroke?: boolean - heading: string | JSX.Element - subheading: string | JSX.Element - img?: JSX.Element + heading: string | ReactElement + subheading: string | ReactElement + img?: ReactElement } export interface FeaturesSection { id: string label?: string - heading: JSX.Element + heading: ReactElement subheading?: string features: Feature[] // { @@ -77,7 +77,7 @@ export interface FeaturesSection { export interface Testimonials { id: string label: string - heading: JSX.Element + heading: ReactElement videos: { [key: string]: { url: string @@ -88,7 +88,7 @@ export interface Testimonials { export interface CTASection { id: string label: string - heading: JSX.Element | string + heading: ReactElement | string subheading: string cta: { label: string diff --git a/apps/www/pages/assistant.tsx b/apps/www/pages/assistant.tsx index 4f99358f92d..360a8e63bec 100644 --- a/apps/www/pages/assistant.tsx +++ b/apps/www/pages/assistant.tsx @@ -4,7 +4,7 @@ import { NextSeo } from 'next-seo' import dynamic from 'next/dynamic' import Link from 'next/link' import { useRouter } from 'next/router' -import { useEffect, useState } from 'react' +import { ReactElement, useEffect, useState } from 'react' import { Button } from 'ui' import DotGrid from '~/components/AIDemo/DotGrid' import { AIDemoPanel } from '~/components/AIDemo/Panel' @@ -17,9 +17,9 @@ const SectionContainer = dynamic(() => import('~/components/Layouts/SectionConta interface Message { id: string role: 'user' | 'assistant' - content: string | JSX.Element + content: string | ReactElement createdAt: Date - render?: JSX.Element + render?: ReactElement } const welcomeMessages = [ diff --git a/apps/www/pages/partners/integrations/[slug].tsx b/apps/www/pages/partners/integrations/[slug].tsx index 38fe738a2fb..d59bc5d5c08 100644 --- a/apps/www/pages/partners/integrations/[slug].tsx +++ b/apps/www/pages/partners/integrations/[slug].tsx @@ -38,7 +38,7 @@ function mdxComponents(callback: Dispatch>) { img: ( props: React.DetailedHTMLProps, HTMLImageElement> ) => { - return callback(props.src!)} /> + return callback(props.src! as string)} /> }, }