diff --git a/apps/dashboard/redirects.js b/apps/dashboard/redirects.js index 297e3e42200..8fd4b2e29c5 100644 --- a/apps/dashboard/redirects.js +++ b/apps/dashboard/redirects.js @@ -271,6 +271,26 @@ async function redirects() { destination: "/solutions/ecosystem", permanent: false, }, + // redirect /storage to portal + { + source: "/storage", + destination: + "https://portal.thirdweb.com/infrastructure/storage/overview", + permanent: false, + }, + // redirect /rpc to portal + { + source: "/rpc-edge", + destination: + "https://portal.thirdweb.com/infrastructure/rpc-edge/overview", + permanent: false, + }, + // redirect /sdk to portal + { + source: "/sdk", + destination: "https://portal.thirdweb.com/connect/blockchain-api", + permanent: false, + }, ...legacyDashboardToTeamRedirects, ]; } diff --git a/apps/dashboard/src/components/homepage/sections/SDKSection.tsx b/apps/dashboard/src/components/homepage/sections/SDKSection.tsx deleted file mode 100644 index 94af54a3123..00000000000 --- a/apps/dashboard/src/components/homepage/sections/SDKSection.tsx +++ /dev/null @@ -1,56 +0,0 @@ -import { Flex } from "@chakra-ui/react"; -import { - CodeSelector, - type CodeSelectorProps, -} from "components/product-pages/homepage/CodeSelector"; -import { HomepageSection } from "components/product-pages/homepage/HomepageSection"; -import { Heading } from "tw-components"; -import { Aurora } from "../Aurora"; - -interface SDKSectionProps { - title?: string; - description?: string; - codeSelectorProps?: CodeSelectorProps; -} - -export const SDKSection: React.FC = ({ - title = "In any language.", - description = "", - codeSelectorProps, -}) => { - return ( - - - - - {title} - - - {description} - - - - - ); -}; diff --git a/apps/dashboard/src/components/product-pages/common/CodeOptionButton.tsx b/apps/dashboard/src/components/product-pages/common/CodeOptionButton.tsx deleted file mode 100644 index 3cb47d53a5f..00000000000 --- a/apps/dashboard/src/components/product-pages/common/CodeOptionButton.tsx +++ /dev/null @@ -1,87 +0,0 @@ -import { JavaScriptIcon } from "components/icons/brand-icons/JavaScriptIcon"; -import { ReactIcon } from "components/icons/brand-icons/ReactIcon"; -import { UnityIcon } from "components/icons/brand-icons/UnityIcon"; -import { useTrack } from "hooks/analytics/useTrack"; -import type { Dispatch, SetStateAction } from "react"; -import { flushSync } from "react-dom"; -import { Button, type ButtonProps } from "tw-components"; - -export const LOGO_OPTIONS = { - javascript: { - icon: JavaScriptIcon, - fill: "yellow", - }, - react: { - icon: ReactIcon, - fill: "#61dafb", - }, - "react-native": { - icon: ReactIcon, - fill: "#61dafb", - }, - unity: { - icon: UnityIcon, - fill: "#ffffff", - }, -} as const; - -export type CodeOptions = keyof typeof LOGO_OPTIONS; - -interface CodeOptionButtonProps extends ButtonProps { - language: CodeOptions; - activeLanguage: CodeOptions; - setActiveLanguage: Dispatch>; -} - -export const CodeOptionButton: React.FC = ({ - children, - language, - setActiveLanguage, - activeLanguage, - ...rest -}) => { - const trackEvent = useTrack(); - const logo = LOGO_OPTIONS[language]; - - const isActive = language === activeLanguage; - - return ( - - ); -}; diff --git a/apps/dashboard/src/components/product-pages/common/GuideShowcase.tsx b/apps/dashboard/src/components/product-pages/common/GuideShowcase.tsx deleted file mode 100644 index 3241b0c386f..00000000000 --- a/apps/dashboard/src/components/product-pages/common/GuideShowcase.tsx +++ /dev/null @@ -1,115 +0,0 @@ -import { Flex, SimpleGrid } from "@chakra-ui/react"; -import { ArrowRightIcon } from "lucide-react"; -import { Heading, TrackedLink, type TrackedLinkProps } from "tw-components"; -import { GuideCard } from "./GuideCard"; -import { ProductSection } from "./ProductSection"; - -type BlogPost = { - title: string; - description?: string; - image: string; - link: string; -}; - -interface GuidesShowcaseProps { - title: string; - description: string; - solution?: string; - category: TrackedLinkProps["category"]; - guides: BlogPost[]; - caseStudies?: true; -} - -export const GuidesShowcase: React.FC = ({ - title, - description, - solution, - guides, - caseStudies, - category, -}) => { - return ( - - - - - {title} - - - {description} - - - - - {guides.map( - ( - { - title: guideTitle, - description: guideDescription, - image, - link, - }, - idx, - ) => ( - - ), - )} - - - {solution && ( - - - - See all of our {solution.replace("-", " ")}{" "} - {caseStudies ? "case studies" : "guides"} - - - - - )} - - - ); -}; diff --git a/apps/dashboard/src/components/product-pages/common/Hero.tsx b/apps/dashboard/src/components/product-pages/common/Hero.tsx deleted file mode 100644 index 5979dccd4b5..00000000000 --- a/apps/dashboard/src/components/product-pages/common/Hero.tsx +++ /dev/null @@ -1,177 +0,0 @@ -import { Container, Flex, GridItem, SimpleGrid } from "@chakra-ui/react"; -import { ChakraNextImage } from "components/Image"; -import { ChevronRightIcon } from "lucide-react"; -import type { StaticImageData } from "next/image"; -import type { ReactElement, ReactNode } from "react"; -import { Heading, LinkButton, Text, TrackedLink } from "tw-components"; -import type { ComponentWithChildren } from "types/component-with-children"; -import { ProductButton } from "./ProductButton"; - -interface HeroProps { - name: string; - title: string; - description: ReactNode; - buttonText: string; - buttonLink: string; - gradient: string; - image?: StaticImageData; - type?: "Products" | "Solutions" | "Learn"; - underGetStarted?: ReactElement; - trackingCategory: string; - secondaryButton?: { - text: string; - link: string; - }; - imageHeight?: string; -} - -export const Hero: ComponentWithChildren = ({ - name, - title, - description, - buttonText, - buttonLink, - image, - gradient, - type = "Products", - underGetStarted, - secondaryButton, - trackingCategory, - children, - imageHeight, -}) => { - return ( -
- - -
- - {type} - - - - {name} - -
- - {title} - - - {description} - - - - - - - - {secondaryButton && ( - - {secondaryButton.text} - - )} - - {underGetStarted} - -
- {image && ( -
- -
- )} -
- - - {children} - -
- ); -}; diff --git a/apps/dashboard/src/components/product-pages/common/ProductLearnMoreCard.tsx b/apps/dashboard/src/components/product-pages/common/ProductLearnMoreCard.tsx deleted file mode 100644 index 5fbc5e87147..00000000000 --- a/apps/dashboard/src/components/product-pages/common/ProductLearnMoreCard.tsx +++ /dev/null @@ -1,58 +0,0 @@ -import { Flex } from "@chakra-ui/react"; -import { ChakraNextImage } from "components/Image"; -import { ArrowRightIcon } from "lucide-react"; -import type { StaticImageData } from "next/image"; -import type { ReactNode } from "react"; -import { - Heading, - Text, - TrackedLink, - type TrackedLinkProps, -} from "tw-components"; - -interface ProductLearnMoreCardProps { - icon: StaticImageData; - title: string; - description: ReactNode; - href: string; - category: TrackedLinkProps["category"]; -} - -export const ProductLearnMoreCard: React.FC = ({ - title, - icon, - description, - href, - category, -}) => { - return ( - -
- - - - {title} - - - - {description} - -
- - Learn more - - -
- ); -}; diff --git a/apps/dashboard/src/components/product-pages/common/ProductSection.tsx b/apps/dashboard/src/components/product-pages/common/ProductSection.tsx deleted file mode 100644 index 474c4aff116..00000000000 --- a/apps/dashboard/src/components/product-pages/common/ProductSection.tsx +++ /dev/null @@ -1,99 +0,0 @@ -import { Box, type BoxProps, Container } from "@chakra-ui/react"; -import type { ComponentWithChildren } from "types/component-with-children"; - -interface IProductSection extends BoxProps { - id?: string; - showPattern?: boolean; -} -export const ProductSection: ComponentWithChildren = ({ - id, - children, - showPattern, - ...restBoxProps -}) => { - return ( - <> - - - - {children} - - {showPattern && } - - - - ); -}; -const BottomPattern: React.FC = () => { - return ( - - - - - - - - - - - - - - - - - - - - - - - ); -}; diff --git a/apps/dashboard/src/components/product-pages/homepage/CodeSelector.tsx b/apps/dashboard/src/components/product-pages/homepage/CodeSelector.tsx deleted file mode 100644 index 2f8e8cce211..00000000000 --- a/apps/dashboard/src/components/product-pages/homepage/CodeSelector.tsx +++ /dev/null @@ -1,197 +0,0 @@ -import { CodeClient } from "@/components/ui/code/code.client"; -import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; -import { useTrack } from "hooks/analytics/useTrack"; -import { FileTextIcon, SquareTerminalIcon } from "lucide-react"; -import { useState } from "react"; -import { LinkButton, type LinkButtonProps } from "tw-components"; -import { CodeOptionButton, type CodeOptions } from "../common/CodeOptionButton"; - -const landingSnippets = { - javascript: `import { createThirdwebClient, getContract } from "thirdweb"; -import { sepolia } from "thirdweb/chains"; - -// initialize the client -const client = createThirdwebClient({ clientId }); - -// connect to your smart contract -const contract = getContract({ client, chain: sepolia, address: "0x..." }); - -// get all NFTs -const nfts = await getNFTs({ contract }); - -console.info(nfts);`, - react: `import { createThirdwebClient, getContract } from "thirdweb"; -import { sepolia } from "thirdweb/chains"; -import { useReadContract, MediaRenderer } from "thirdweb/react"; - -// initialize the client -const client = createThirdwebClient({ clientId }); - -// connect to your smart contract -const contract = getContract({ client, chain: sepolia, address: "0x..." }); - -export default function App() { - // Get all NFTs - const { data: nfts, isPending } = useReadContract(getNFTs, { contract }); - - // Render NFTs - return (nfts.data || []).map((nft) => ( - - )); -}`, - "react-native": `import { createThirdwebClient, getContract, resolveScheme } from "thirdweb"; -import { sepolia } from "thirdweb/chains"; -import { useReadContract } from "thirdweb/react"; - -// initialize the client -const client = createThirdwebClient({ clientId }); - -// connect to your smart contract -const contract = getContract({ client, chain: sepolia, address: "0x..." }); - -export default function App() { - // Get all NFTs - const { data: nfts, isPending } = useReadContract(getNFTs, { contract }); - - // Render NFTs - return (nfts.data || []).map((nft) => ( - - )); -}`, - unity: `using Thirdweb; - -// Reference the SDK -var sdk = ThirdwebManager.Instance.SDK; - -// Get any contract -Contract contract = sdk.GetContract("0xb1c42E0C4289E68f1C337Eb0Da6a38C4c9F3f58e"); - -// Get all NFTs -List nfts = await contract.ERC721.GetAll()`, -}; - -export interface CodeSelectorProps { - defaultLanguage?: CodeOptions; - docs?: string; -} - -const queryClient = new QueryClient(); - -export const CodeSelector: React.FC = ({ - defaultLanguage = "javascript", - docs = "https://portal.thirdweb.com/", -}) => { - const [activeLanguage, setActiveLanguage] = - useState(defaultLanguage); - const trackEvent = useTrack(); - - return ( - <> -
-
- {Object.keys(landingSnippets).map((key) => - landingSnippets[key as keyof typeof landingSnippets] ? ( - - {key === "javascript" - ? "JavaScript" - : key === "react-native" - ? "React Native" - : key} - - ) : null, - )} -
-
- -
- - - - - {/* Links for Replit and Docs */} -
- } - onClick={() => - trackEvent({ - category: "code-selector", - action: "click", - label: "try-it", - }) - } - /> - - } - onClick={() => - trackEvent({ - category: "code-selector", - action: "click", - label: "documentation", - }) - } - /> -
-
- - ); -}; - -interface CustomLinkButtonProps extends LinkButtonProps { - onClick: () => void; - text: string; - href: string; - icon: React.ReactElement; -} - -const CustomLinkButton: React.FC = ({ - onClick, - href, - icon, - text, - ...linkButtonProps -}) => { - return ( - - {text} - - ); -}; diff --git a/apps/dashboard/src/page-id.ts b/apps/dashboard/src/page-id.ts index 091e09b38b9..c64ca79062b 100644 --- a/apps/dashboard/src/page-id.ts +++ b/apps/dashboard/src/page-id.ts @@ -27,9 +27,6 @@ export enum PageId { // thirdweb.com/contract-extensions // ContractExtensionsLanding = "contract-extensions-landing", - // thirdweb.com/web3-sdk - Web3SDKLanding = "web3-sdk-landing", - // thirdweb.com/account-abstraction SmartWalletLanding = "smart-wallet-landing", @@ -39,15 +36,9 @@ export enum PageId { // thirdweb.com/connec ConnectLanding = "connect-landing", - // thirdweb.com/interact - InteractLanding = "interact-landing", - // thirdweb.com/auth AuthLanding = "auth-landing", - // thirdweb.com/rpc-edge - RPCEdgeLanding = "rpc-edge-landing", - // thirdweb.com/cointracts ContractsLanding = "contracts-landing", diff --git a/apps/dashboard/src/pages/rpc-edge.tsx b/apps/dashboard/src/pages/rpc-edge.tsx deleted file mode 100644 index a899464cd47..00000000000 --- a/apps/dashboard/src/pages/rpc-edge.tsx +++ /dev/null @@ -1,183 +0,0 @@ -import { Card } from "@/components/ui/card"; -import { Container, Flex } from "@chakra-ui/react"; -import { LandingEndCTA } from "components/landing-pages/end-cta"; -import { LandingGridSection } from "components/landing-pages/grid-section"; -import { LandingGuidesShowcase } from "components/landing-pages/guide-showcase"; -import { LandingHeroWithSideImage } from "components/landing-pages/hero-with-side-image"; -import { LandingIconSectionItem } from "components/landing-pages/icon-section-item"; -import { LandingLayout } from "components/landing-pages/layout"; -import { LandingSectionHeading } from "components/landing-pages/section-heading"; -import { getAbsoluteUrl } from "lib/vercel-utils"; -import { PageId } from "page-id"; -import type { ThirdwebNextPage } from "utils/types"; - -const TRACKING_CATEGORY = "rpc-edge-landing"; - -const CASE_STUDIES = [ - { - title: - "Base Launches its First Builder Quest & Brings New Developers Onchain", - image: - "https://blog.thirdweb.com/content/images/size/w2000/2023/05/Base-Launches-its-First-Builder-Quest-and-Brings-New-Developers-Onchain---thirdweb-Case-Study-1.png", - link: "https://blog.thirdweb.com/case-studies/base-builder-quest-brings-developers-onchain/", - }, - { - title: - "Mirror Empowers Creators to Build Engaged Audiences with Subscriber NFTs", - image: - "https://blog.thirdweb.com/content/images/size/w2000/2023/02/Mirror-case-study.png", - link: "https://blog.thirdweb.com/case-studies/mirror-creators-build-loyal-audiences-with-subscriber-nfts/", - }, - { - title: - "Layer3 Powers Web3 Adoption through Gamified Experiences & NFT Rewards", - image: - "https://blog.thirdweb.com/content/images/size/w2000/2022/12/Layer3--2-.png", - link: "https://blog.thirdweb.com/case-studies/layer3-powers-web3-adoption-through-gamified-experiences-nft-rewards/", - }, -]; - -const RPCEdgeLanding: ThirdwebNextPage = () => { - return ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - } - > - - - - - - - - - - - - - - - - - ); -}; - -RPCEdgeLanding.pageId = PageId.RPCEdgeLanding; - -export default RPCEdgeLanding; diff --git a/apps/dashboard/src/pages/sdk.tsx b/apps/dashboard/src/pages/sdk.tsx deleted file mode 100644 index 34e5023eb49..00000000000 --- a/apps/dashboard/src/pages/sdk.tsx +++ /dev/null @@ -1,207 +0,0 @@ -import { Flex, Icon, SimpleGrid } from "@chakra-ui/react"; -import { Aurora } from "components/homepage/Aurora"; -import { SDKSection } from "components/homepage/sections/SDKSection"; -import { LOGO_OPTIONS } from "components/product-pages/common/CodeOptionButton"; -import { GuidesShowcase } from "components/product-pages/common/GuideShowcase"; -import { Hero } from "components/product-pages/common/Hero"; -import { ProductCard } from "components/product-pages/common/ProductCard"; -import { ProductLearnMoreCard } from "components/product-pages/common/ProductLearnMoreCard"; -import { ProductPage } from "components/product-pages/common/ProductPage"; -import { ProductSection } from "components/product-pages/common/ProductSection"; -import { getAbsoluteUrl } from "lib/vercel-utils"; -import Link from "next/link"; -import { PageId } from "page-id"; -import type { ThirdwebNextPage } from "utils/types"; - -const SDK_GUIDES = [ - { - title: "Interact with Any Smart Contract in the SDK using ABIs", - image: - "https://blog.thirdweb.com/content/images/size/w2000/2022/10/how-to-use-any-contract-3.png", - link: "https://blog.thirdweb.com/guides/how-to-use-any-smart-contract-with-thirdweb-sdk-using-abi/", - }, - { - title: "How to Render NFT Metadata In a React App", - image: - "https://blog.thirdweb.com/content/images/size/w2000/2022/11/This-is-the-one--18-.png", - link: "https://blog.thirdweb.com/guides/how-to-render-nft-metadata-in-a-react-app-using-thirdwebnftmedia/", - }, - { - title: "Get Started with the Unity SDK", - image: - "https://blog.thirdweb.com/content/images/size/w2000/2022/12/This-is-the-one--36-.png", - link: "https://blog.thirdweb.com/guides/get-started-with-thirdwebs-unity-sdk/", - }, -]; - -const TRACKING_CATEGORY = "sdks"; - -const Web3SDK: ThirdwebNextPage = () => { - return ( - - - - - Use SDKs in programming languages that you are most comfortable - with. - - {Object.keys(LOGO_OPTIONS).map((key) => ( - - ))} - - - - Utilities for common use cases so that you do not have to reinvent - the wheel every time and have faster development cycles. - - - Build apps and games that interact with contracts easily. Thorough - developer documentation on following best practices. No need to - configure manually for each partner provider. - - - - - - - - - - - - - Interact with your contracts from your app in the programming - language that you’re familiar with our{" "} - - React - - ,{" "} - - ReactNative - - ,{" "} - - TypeScript - - ,{" "} - - Unity - {" "} - SDKs. - - } - icon={require("../../public/assets/product-pages/dashboard/hero-icon-3.png")} - href="https://portal.thirdweb.com/" - /> - - - - - - - - - ); -}; - -Web3SDK.pageId = PageId.Web3SDKLanding; - -export default Web3SDK; diff --git a/apps/dashboard/src/pages/storage.tsx b/apps/dashboard/src/pages/storage.tsx deleted file mode 100644 index c94f3b547e3..00000000000 --- a/apps/dashboard/src/pages/storage.tsx +++ /dev/null @@ -1,162 +0,0 @@ -import { Card } from "@/components/ui/card"; -import { Container, Flex } from "@chakra-ui/react"; -import { LandingEndCTA } from "components/landing-pages/end-cta"; -import { LandingGridSection } from "components/landing-pages/grid-section"; -import { LandingGuidesShowcase } from "components/landing-pages/guide-showcase"; -import { LandingHeroWithSideImage } from "components/landing-pages/hero-with-side-image"; -import { LandingIconSectionItem } from "components/landing-pages/icon-section-item"; -import { LandingLayout } from "components/landing-pages/layout"; -import { getAbsoluteUrl } from "lib/vercel-utils"; -import { PageId } from "page-id"; -import type { ThirdwebNextPage } from "utils/types"; - -const TRACKING_CATEGORY = "storage-landing"; - -const GUIDES = [ - { - title: "Host Your Web Application On IPFS", - image: - "https://blog.thirdweb.com/content/images/size/w2000/2023/03/How-to-Host-Your-App-On-IPFS.png", - link: "https://blog.thirdweb.com/guides/how-to-host-your-web-app-on-ipfs/", - }, - { - title: "What Is IPFS and How Does it Store NFT Metadata?", - image: - "https://blog.thirdweb.com/content/images/size/w2000/2022/08/thumbnail-43.png", - link: "https://blog.thirdweb.com/guides/securing-pinning-your-nft-with-ipfs/", - }, -]; - -const CASE_STUDIES = [ - { - title: "Tally Builds DAO Platform for the Decentralized Web", - image: - "https://blog.thirdweb.com/content/images/size/w2000/2023/07/Tally-Launches-a-Fully-Decentralized-DAO-Voting-App-with-IPFS-1.jpg", - link: "https://blog.thirdweb.com/case-studies/tally-expands-the-decentralized-web-with-dao-tools/", - }, - { - title: - "Base Launches its First Builder Quest & Brings New Developers Onchain", - image: - "https://blog.thirdweb.com/content/images/size/w2000/2023/05/Base-Launches-its-First-Builder-Quest-and-Brings-New-Developers-Onchain---thirdweb-Case-Study-1.png", - link: "https://blog.thirdweb.com/case-studies/base-builder-quest-brings-developers-onchain/", - }, - { - title: - "Mirror Empowers Creators to Build Engaged Audiences with Subscriber NFTs", - image: - "https://blog.thirdweb.com/content/images/size/w2000/2023/02/Mirror-case-study.png", - link: "https://blog.thirdweb.com/case-studies/mirror-creators-build-loyal-audiences-with-subscriber-nfts/", - }, -]; - -const InteractLanding: ThirdwebNextPage = () => { - return ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - ); -}; - -InteractLanding.pageId = PageId.InteractLanding; - -export default InteractLanding; diff --git a/turbo.json b/turbo.json index 735b2de5d6a..46278485305 100644 --- a/turbo.json +++ b/turbo.json @@ -6,16 +6,6 @@ "outputs": ["dist/**"], "dependsOn": ["^build"] }, - "postbuild": { - "outputs": [ - "dist/**", - ".next/**", - "public/robots.txt", - "public/sitemap*.xml", - "searchIndex.json" - ], - "inputs": ["$TURBO_DEFAULT$", ".next/**"] - }, "bench": { "cache": false, "dependsOn": []