(
- (_props, forwardedRef) => {
- const {
- language,
- value,
- line = "0",
- className = "",
- css,
- variant,
- showLineNumbers,
- ...props
- } = _props;
- let result: any = refractor.highlight(value, language);
-
- const classes = `language-${language} ${className}`;
-
- return (
-
-
-
- );
- }
-);
diff --git a/packages/www/components/Site/MDXComponents/DocCodeBlock.tsx b/packages/www/components/Site/MDXComponents/DocCodeBlock.tsx
deleted file mode 100644
index a3c01b6abd..0000000000
--- a/packages/www/components/Site/MDXComponents/DocCodeBlock.tsx
+++ /dev/null
@@ -1,209 +0,0 @@
-import React from "react";
-import { Box, Button, IconButton, Tooltip } from "@livepeer/design-system";
-import copy from "copy-to-clipboard";
-import { getParameters } from "codesandbox/lib/api/define";
-import {
- ClipboardIcon,
- CodeSandboxLogoIcon,
- CheckIcon,
-} from "@radix-ui/react-icons";
-import * as Collapsible from "@radix-ui/react-collapsible";
-import Pre from "./Pre";
-import { FrontmatterContext } from "./index";
-
-const DocCodeBlock = ({
- className,
- children,
- id,
- showLineNumbers = false,
- isHero = false,
- isCollapsible = false,
- isScrollable = false,
- variant,
- isHighlightingLines,
-}) => {
- const [isCollapsed, setIsCollapsed] = React.useState(isCollapsible);
- const [hasCopied, setHasCopied] = React.useState(false);
- const [code, setCode] = React.useState(undefined);
- const preRef = React.useRef(null);
- const frontmatter = React.useContext(FrontmatterContext);
-
- React.useEffect(() => {
- if (preRef.current) {
- const codeElement = preRef.current.querySelector("code");
- // remove double line breaks
- const code = codeElement.innerText.replace(/\n{3,}/g, "\n");
- setCode(code);
- }
- }, [preRef]);
-
- React.useEffect(() => {
- if (hasCopied) copy(code);
- setTimeout(() => setHasCopied(false), 1500);
- }, [hasCopied]);
-
- return (
-
- setIsCollapsed(!isOpen)}>
- {isCollapsible && (
-
-
-
-
-
- {isHero && (
-
-
-
-
-
-
-
-
-
- )}
-
- )}
-
-
-
- pre": {
- backgroundColor: "transparent",
- overflow: "visible",
- py: 0,
- float: "left",
- minWidth: "100%",
- $$outline: "none",
- borderRadius: 0,
- },
- // end hacks
- ...(isHero || isScrollable ? { maxHeight: 400 } : {}),
- }}>
-
-
-
-
- &, &:focus": {
- opacity: 1,
- transition: "150ms linear",
- },
- }}
- onClick={() => setHasCopied(true)}>
- {hasCopied ? : }
-
-
-
-
-
- );
-};
-
-const makeCodeSandboxParams = (name, code) => {
- const css =
- "*{box-sizing:border-box;margin:0;padding:0;}body{font-family:system-ui;width:100vw;height:100vh;background-image:linear-gradient(330deg, hsl(272,53%,50%) 0%, hsl(226,68%,56%) 100%);display:flex;align-items:flex-start;justify-content:center;}body>div{padding-top:120px}svg{display:block;}";
-
- const parameters = getParameters({
- files: {
- "package.json": {
- content: {
- dependencies: {
- react: "latest",
- "react-dom": "latest",
- "@stitches/react": "latest",
- "@radix-ui/colors": "latest",
- "@radix-ui/react-icons": "latest",
- [`@radix-ui/react-${name}`]: "latest",
- },
- } as any,
- isBinary: false,
- },
- "App.js": {
- content: code,
- isBinary: false,
- },
- "index.js": {
- content: `import React from 'react';
-import ReactDOM from 'react-dom';
-import App from './App';
-import './styles.css';
-ReactDOM.render(, document.getElementById('root'));`,
- isBinary: false,
- },
- "styles.css": {
- content: css,
- isBinary: false,
- },
- },
- template: "create-react-app",
- });
-
- return parameters;
-};
-
-export default DocCodeBlock;
diff --git a/packages/www/components/Site/MDXComponents/HeroContainer.tsx b/packages/www/components/Site/MDXComponents/HeroContainer.tsx
deleted file mode 100644
index a7c7ae5046..0000000000
--- a/packages/www/components/Site/MDXComponents/HeroContainer.tsx
+++ /dev/null
@@ -1,34 +0,0 @@
-import React from "react";
-import { Box } from "@livepeer/design-system";
-
-const HeroContainer = ({
- css,
- children,
-}: {
- css?: any;
- children?: React.ReactNode;
-}) => {
- return (
-
- {children}
-
- );
-};
-
-export default HeroContainer;
diff --git a/packages/www/components/Site/MDXComponents/KeyboardTable.tsx b/packages/www/components/Site/MDXComponents/KeyboardTable.tsx
deleted file mode 100644
index 2e79a5e153..0000000000
--- a/packages/www/components/Site/MDXComponents/KeyboardTable.tsx
+++ /dev/null
@@ -1,77 +0,0 @@
-import React from "react";
-import { Box, Text, Kbd } from "@livepeer/design-system";
-import TableContainer from "./TableContainer";
-
-type KeyboardDef = {
- keys: string[];
- description: React.ReactNode;
-};
-
-const KeyboardTable = ({
- data,
- "aria-label": ariaLabel,
- "aria-labelledby": ariaLabelledBy,
-}: {
- data: KeyboardDef[];
- "aria-label"?: string;
- "aria-labelledby"?: string;
-}) => {
- const hasAriaLabel = !!(ariaLabel || ariaLabelledBy);
- return (
-
-
-
-
-
- Key
-
-
-
-
- Description
-
-
-
-
-
- {data.map(({ keys, description }, i) => (
-
-
- {keys.map((k) => (
-
- {k}
-
- ))}
-
-
-
- {description}
-
-
-
- ))}
-
-
- );
-};
-
-export default KeyboardTable;
diff --git a/packages/www/components/Site/MDXComponents/Post.tsx b/packages/www/components/Site/MDXComponents/Post.tsx
deleted file mode 100644
index 7b8486e54c..0000000000
--- a/packages/www/components/Site/MDXComponents/Post.tsx
+++ /dev/null
@@ -1,54 +0,0 @@
-import { Box, Heading, Text, Link as A } from "@livepeer/design-system";
-import Link from "next/link";
-import Image from "next/image";
-
-const Card = ({ description, title, image, href }) => {
- return (
-
-
-
- {image && (
-
- )}
-
-
-
- {title}
-
- {description && (
-
- {description}
-
- )}
-
-
-
- );
-};
-
-export default Card;
diff --git a/packages/www/components/Site/MDXComponents/Pre.tsx b/packages/www/components/Site/MDXComponents/Pre.tsx
deleted file mode 100644
index eb9c9e32c8..0000000000
--- a/packages/www/components/Site/MDXComponents/Pre.tsx
+++ /dev/null
@@ -1,300 +0,0 @@
-import { styled, getThemes } from "@livepeer/design-system";
-
-const theme: any = getThemes();
-
-const Pre = styled("pre", {
- $$background: "$loContrast",
- $$text: "$colors$hiContrast",
- $$outline: "inset 0 0 0 1px $colors$neutral6",
- $$syntax1: "$colors$blue11",
- $$syntax2: "$colors$cyan11",
- $$syntax3: "$colors$blue11",
- $$syntax4: "$colors$blue11",
- $$comment: "$colors$neutral10",
- $$removed: "$colors$red11",
- $$added: "$colors$green11",
- $$lineNumbers: "$colors$blue5",
- $$fadedLines: "$colors$neutral10",
- $$highlightedLineBg: "$colors$blue3",
- $$highlightedWord1Bg: "$colors$blue4",
- $$highlightedWord1BgActive: "$colors$blue6",
- $$highlightedWord1Text: "$colors$blue11",
- $$highlightedWord2Bg: "$colors$red3",
- $$highlightedWord2BgActive: "$colors$red5",
- $$highlightedWord2Text: "$colors$red11",
- $$highlightedWord3Bg: "$colors$green3",
- $$highlightedWord3BgActive: "$colors$green5",
- $$highlightedWord3Text: "$colors$green11",
-
- boxSizing: "border-box",
- borderRadius: "$3",
- padding: "$4 $5",
- overflow: "auto",
- fontFamily: "$mono",
- fontSize: "$2",
- lineHeight: "21px",
- whiteSpace: "pre",
- position: "relative",
- backgroundColor: "$$background",
- color: "$$text",
- boxShadow: "$$outline",
-
- "& > code": {
- display: "block",
- },
-
- ".token.parameter": {
- color: "$$text",
- },
-
- ".token.tag, .token.class-name, .token.selector, .token.selector .class, .token.function":
- {
- color: "$$syntax1",
- },
-
- ".token.attr-value, .token.class, .token.string, .token.number, .token.unit, .token.color":
- {
- color: "$$syntax2",
- },
-
- ".token.attr-name, .token.keyword, .token.rule, .token.operator, .token.pseudo-class, .token.important":
- {
- color: "$$syntax3",
- },
-
- ".token.punctuation, .token.module, .token.property": {
- color: "$$syntax4",
- },
-
- ".token.comment": {
- color: "$$comment",
- },
-
- ".token.atapply .token:not(.rule):not(.important)": {
- color: "inherit",
- },
-
- ".language-shell .token:not(.comment)": {
- color: "inherit",
- },
-
- ".language-css .token.function": {
- color: "inherit",
- },
-
- ".token.deleted:not(.prefix), .token.inserted:not(.prefix)": {
- display: "block",
- px: "$4",
- mx: "-20px",
- },
-
- ".token.deleted:not(.prefix)": {
- color: "$$removed",
- },
-
- ".token.inserted:not(.prefix)": {
- color: "$$added",
- },
-
- ".token.deleted.prefix, .token.inserted.prefix": {
- userSelect: "none",
- },
-
- // Styles for highlighted word
- ".highlight-word": {
- $$bgAndShadow: "$$highlightedWord1Bg",
- $$xOffset: "0px",
- color: "$$highlightedWord1Text",
- backgroundColor: "$$bgAndShadow",
- display: "inline-block",
- boxShadow: "$$xOffset 0 0 0 $$bgAndShadow, -$$xOffset 0 0 0 $$bgAndShadow",
- borderRadius: "2px",
-
- // reset the color for tokens inside highlighted words
- ".token": {
- color: "inherit",
- },
-
- "&.on": {
- $$bgAndShadow: "$$highlightedWord1BgActive",
- transition: "all 100ms ease",
- cursor: "pointer",
- },
- },
-
- ".token.deleted .highlight-word": {
- $$bgAndShadow: "$$highlightedWord2Bg",
- color: "$$highlightedWord2Text",
-
- "&.on": {
- $$bgAndShadow: "$$highlightedWord2BgActive",
- },
- },
-
- ".token.inserted .highlight-word": {
- $$bgAndShadow: "$$highlightedWord3Bg",
- color: "$$highlightedWord3Text",
-
- "&.on": {
- $$bgAndShadow: "$$highlightedWord3BgActive",
- },
- },
-
- // Line numbers
- "&[data-line-numbers=true]": {
- ".highlight-line": {
- position: "relative",
- paddingLeft: "$4",
-
- "&::before": {
- content: "attr(data-line)",
- position: "absolute",
- left: -5,
- top: 0,
- color: "$$lineNumbers",
- },
- },
- "&[data-invert-line-highlight=true]": {
- ".highlight-line": {
- "&::before": {
- left: 10,
- },
- },
- },
- },
-
- // Styles for highlighted lines
- "&[data-invert-line-highlight=false] .highlight-line": {
- "&, *": {
- transition: "color 150ms ease",
- },
- "&[data-highlighted=false]": {
- "&, *": {
- color: "$$fadedLines",
- },
- },
- },
-
- // data-invert-line-highlight
- // Styles for inverted line highlighting
- "&[data-invert-line-highlight=true] .highlight-line": {
- mx: "-$5",
- px: "$5",
- "&[data-highlighted=true]": {
- backgroundColor: "$$highlightedLineBg",
- },
- },
-
- // Typewriter styles
- ".typewriter": {
- opacity: 0,
- },
-
- variants: {
- variant: {
- indigo: {
- $$background: "$colors$blue2",
- $$text: "$colors$blue11",
- $$outline: "inset 0 0 0 1px $colors$blue4",
- $$syntax1: "$colors$blue10",
- $$syntax2: "$colors$pink11",
- $$comment: "$colors$primary9",
- $$fadedLines: "$colors$primaryA8",
- },
- blueOld: {
- $$background: theme.colors.mauve12.value,
- $$text: theme.colors.gray5.value,
- $$outline: "none",
- $$syntax1: theme.colors.cyan8.value,
- $$syntax2: theme.colors.blue8.value,
- $$syntax3: theme.colors.cyan8.value,
- $$syntax4: theme.colors.cyan8.value,
- $$comment: theme.colors.mauve9.value,
- $$removed: "$colors$red9",
- $$added: "$colors$green9",
- $$lineNumbers: "hsl(210 37% 35%)",
- $$fadedLines: theme.colors.slate11.value,
- $$highlightedWord1Bg: "$colors$blue12",
- $$highlightedWord1BgActive: "$colors$blue11",
- $$highlightedWord1Text: "$colors$blue4",
- $$highlightedWord2Bg: "$colors$red12",
- $$highlightedWord2BgActive: "$colors$red11",
- $$highlightedWord2Text: "$colors$red4",
- $$highlightedWord3Bg: "$colors$green12",
- $$highlightedWord3BgActive: "$colors$green11",
- $$highlightedWord3Text: "$colors$green4",
- },
- cyan: {
- $$background: theme.colors.slate12.value,
- $$text: theme.colors.gray5.value,
- $$outline: "none",
- $$syntax1: theme.colors.yellow7.value,
- $$syntax2: theme.colors.cyan8.value,
- $$syntax3: theme.colors.yellow7.value,
- $$syntax4: theme.colors.yellow7.value,
- $$comment: theme.colors.slate10.value,
- $$removed: "$colors$red9",
- $$added: "$colors$green9",
- $$lineNumbers: "hsl(210 37% 35%)",
- $$fadedLines: theme.colors.slate11.value,
- $$highlightedWord1Bg: "$colors$blue12",
- $$highlightedWord1BgActive: "$colors$blue11",
- $$highlightedWord1Text: "$colors$blue4",
- $$highlightedWord2Bg: "$colors$red12",
- $$highlightedWord2BgActive: "$colors$red11",
- $$highlightedWord2Text: "$colors$red4",
- $$highlightedWord3Bg: "$colors$green12",
- $$highlightedWord3BgActive: "$colors$green11",
- $$highlightedWord3Text: "$colors$green4",
- },
- yellow: {
- $$background: "hsl(50 10% 5%)",
- $$text: theme.colors.gray5.value,
- $$outline: "none",
- $$syntax1: theme.colors.red9.value,
- $$syntax2: theme.colors.yellow7.value,
- $$syntax3: theme.colors.red9.value,
- $$syntax4: theme.colors.red9.value,
- $$comment: theme.colors.sand9.value,
- $$removed: "$colors$red9",
- $$added: "$colors$green9",
- $$lineNumbers: theme.colors.yellow10.value,
- $$fadedLines: theme.colors.sand11.value,
- $$highlightedWord1Bg: "$colors$blue12",
- $$highlightedWord1BgActive: "$colors$blue11",
- $$highlightedWord1Text: "$colors$blue4",
- $$highlightedWord2Bg: "$colors$red12",
- $$highlightedWord2BgActive: "$colors$red11",
- $$highlightedWord2Text: "$colors$red4",
- $$highlightedWord3Bg: "$colors$green12",
- $$highlightedWord3BgActive: "$colors$green11",
- $$highlightedWord3Text: "$colors$green4",
- },
- blue: {
- $$background: theme.colors.slate12.value,
- $$text: theme.colors.gray5.value,
- $$outline: "none",
- $$syntax1: theme.colors.blue8.value,
- $$syntax2: theme.colors.pink8.value,
- $$syntax3: theme.colors.blue8.value,
- $$syntax4: theme.colors.blue8.value,
- $$comment: theme.colors.slate9.value,
- $$removed: "$colors$red9",
- $$added: "$colors$green9",
- $$lineNumbers: "hsl(210 37% 35%)",
- $$fadedLines: theme.colors.slate11.value,
- $$highlightedWord1Bg: "$colors$blue12",
- $$highlightedWord1BgActive: "$colors$blue11",
- $$highlightedWord1Text: "$colors$blue4",
- $$highlightedWord2Bg: "$colors$red12",
- $$highlightedWord2BgActive: "$colors$red11",
- $$highlightedWord2Text: "$colors$red4",
- $$highlightedWord3Bg: "$colors$green12",
- $$highlightedWord3BgActive: "$colors$green11",
- $$highlightedWord3Text: "$colors$green4",
- },
- },
- },
-});
-
-export default Pre;
diff --git a/packages/www/components/Site/MDXComponents/Preview.tsx b/packages/www/components/Site/MDXComponents/Preview.tsx
deleted file mode 100644
index 4d072516b5..0000000000
--- a/packages/www/components/Site/MDXComponents/Preview.tsx
+++ /dev/null
@@ -1,20 +0,0 @@
-import { Box } from "@livepeer/design-system";
-
-const Preview = ({ css, ...props }) => (
-
-);
-
-export default Preview;
diff --git a/packages/www/components/Site/MDXComponents/Table.tsx b/packages/www/components/Site/MDXComponents/Table.tsx
deleted file mode 100644
index 4efab39c1b..0000000000
--- a/packages/www/components/Site/MDXComponents/Table.tsx
+++ /dev/null
@@ -1,80 +0,0 @@
-import { Box, Text, Link as A } from "@livepeer/design-system";
-import Link from "next/link";
-import TableContainer from "./TableContainer";
-
-type PropDef = {
- name: string;
- required?: boolean;
- default?: string | boolean;
- type: string;
- typeSimple: string;
- description?: string;
-};
-
-const Table = ({
- data,
- "aria-label": ariaLabel,
- "aria-labelledby": ariaLabelledBy,
-}: {
- data: PropDef[];
- "aria-label"?: string;
- "aria-labelledby"?: string;
-}) => {
- const hasAriaLabel = !!(ariaLabel || ariaLabelledBy);
- const rows = [...new Set(data.flatMap((x) => Object.keys(x)))];
- return (
-
-
-
- {rows.map((row, i) => (
-
-
- {row}
-
-
- ))}
-
-
-
- {data.map((row, i) => (
-
- {Object.entries(row).map(([key, value], i) => (
-
- {key === "link" ? (
-
- {value}
-
- ) : (
- {value}
- )}
-
- ))}
-
- ))}
-
-
- );
-};
-
-export default Table;
diff --git a/packages/www/components/Site/MDXComponents/TableContainer.tsx b/packages/www/components/Site/MDXComponents/TableContainer.tsx
deleted file mode 100644
index 6c416618ba..0000000000
--- a/packages/www/components/Site/MDXComponents/TableContainer.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-import { Box, Container } from "@livepeer/design-system";
-
-const TableContainer = ({
- "aria-label": ariaLabel,
- "aria-labelledby": ariaLabelledBy,
- ...props
-}) => {
- return (
-
-
-
- );
-};
-
-export default TableContainer;
diff --git a/packages/www/components/Site/MDXComponents/index.tsx b/packages/www/components/Site/MDXComponents/index.tsx
deleted file mode 100644
index 94b5941aa5..0000000000
--- a/packages/www/components/Site/MDXComponents/index.tsx
+++ /dev/null
@@ -1,278 +0,0 @@
-import { ReactNode, createContext } from "react";
-import NextLink from "next/link";
-import * as DS from "@livepeer/design-system";
-import { Link2Icon } from "@radix-ui/react-icons";
-import Table from "./Table";
-import KeyboardTable from "./KeyboardTable";
-import Preview from "./Preview";
-import DocCodeBlock from "./DocCodeBlock";
-import { PackageRelease, PRLink } from "./releaseHelpers";
-import HeroContainer from "./HeroContainer";
-import Card from "./Card";
-import Post from "./Post";
-
-export type Frontmatter = {
- metaTitle: string;
- metaDescription?: string;
- publishedAt?: string;
- metaImage?: string;
- features?: string[];
- version?: string;
- versions?: string[];
- aria?: string;
- name?: string;
- publishedName?: string;
- slug: string;
- by?: "colm" | "stephen" | "pedro";
- readingTime?: { text: string; minutes: number; time: number; words: number };
- gzip?: number;
-};
-
-export const components = {
- ...DS,
- Tabs: (props) => (
-
- ),
- TabsList: (props) => (
-
- ),
-
- h1: (props) => (
-
- ),
- Description: ({ children, ...props }) => {
- // takes the text even if it's wrapped in ``
- // https://github.com/wooorm/xdm/issues/47
- const childText =
- typeof children === "string" ? children : children.props.children;
- return (
-
- );
- },
- h2: ({ children, id, ...props }) => (
-
-
- {children}
-
-
- ),
- h3: ({ children, id, ...props }) => (
-
-
- {children}
-
-
- ),
- h4: (props) => (
-
- ),
- p: (props) => ,
- a: ({ href = "", ...props }) => {
- if (href.startsWith("http") || href.startsWith("mailto")) {
- return (
-
- );
- }
- return (
-
-
-
- );
- },
- hr: (props) => (
-
- ),
- ul: (props) => (
-
- ),
- ol: (props) => (
-
- ),
- li: (props) => (
-
-
-
- ),
- strong: (props) => (
-
- ),
- img: ({ ...props }) => (
-
-
-
- ),
- blockquote: (props) => (
-
- ),
- pre: ({ children }) => <>{children}>,
- inlineCode: (props) => ,
- code: ({
- className,
- hero,
- showLineNumbers,
- collapsed,
- scrollable,
- line,
- ...props
- }) => {
- const isInlineCode = !className;
- return isInlineCode ? (
-
- ) : (
-
- );
- },
- Note: (props) => (
-
- ),
- Kbd: DS.Kbd,
- Code: DS.Code,
- Table: (props) => (
-
-
-
- ),
- KeyboardTable: (props) => (
-
-
-
- ),
- Preview,
- PackageRelease,
- PRLink,
- HeroContainer,
- Post,
- Card,
-};
-
-const LinkHeading = ({
- id,
- children,
- css,
-}: {
- id: string;
- children: ReactNode;
- css?: any;
-}) => (
-
-
- {children}
-
-
-
-
-
-);
-
-export const FrontmatterContext = createContext({} as any);
-
-// Custom provider for next-mdx-remote
-// https://github.com/hashicorp/next-mdx-remote#using-providers
-export function MDXProvider(props) {
- const { frontmatter, children } = props;
- return (
-
- {children}
-
- );
-}
diff --git a/packages/www/components/Site/MDXComponents/releaseHelpers.tsx b/packages/www/components/Site/MDXComponents/releaseHelpers.tsx
deleted file mode 100644
index 2b644d51d8..0000000000
--- a/packages/www/components/Site/MDXComponents/releaseHelpers.tsx
+++ /dev/null
@@ -1,42 +0,0 @@
-import React from "react";
-import { Paragraph, Badge, Link, Text } from "@livepeer/design-system";
-
-export function PackageRelease({
- name,
- version,
-}: {
- id: string;
- name: string;
- version: string;
-}) {
- return (
-
- {name}{" "}
-
- {version}
-
-
- );
-}
-
-export function PRLink({ id }: { id: number | number[] }) {
- const ids = Array.isArray(id) ? id : [id];
- return (
-
- –{" "}
- {ids.map((id, i, arr) => (
-
-
- #{id}
-
- {i < arr.length - 1 ? " " : null}
-
- ))}
-
- );
-}
diff --git a/packages/www/components/Site/NavDropdown/index.tsx b/packages/www/components/Site/NavDropdown/index.tsx
deleted file mode 100644
index 27b8dbfcaa..0000000000
--- a/packages/www/components/Site/NavDropdown/index.tsx
+++ /dev/null
@@ -1,71 +0,0 @@
-import {
- HoverCardRoot,
- HoverCardContent,
- HoverCardTrigger,
- HoverCardArrow as HoverCardArrowBase,
- Box,
- styled,
- keyframes,
-} from "@livepeer/design-system";
-
-const slideUpAndFade = keyframes({
- "0%": { opacity: 0, transform: "translateY(2px)" },
- "100%": { opacity: 1, transform: "translateY(0)" },
-});
-
-const slideRightAndFade = keyframes({
- "0%": { opacity: 0, transform: "translateX(-2px)" },
- "100%": { opacity: 1, transform: "translateX(0)" },
-});
-
-const slideDownAndFade = keyframes({
- "0%": { opacity: 0, transform: "translateY(-2px)" },
- "100%": { opacity: 1, transform: "translateY(0)" },
-});
-
-const slideLeftAndFade = keyframes({
- "0%": { opacity: 0, transform: "translateX(2px)" },
- "100%": { opacity: 1, transform: "translateX(0)" },
-});
-
-const StyledContent = styled(HoverCardContent, {
- boxSizing: "border-box",
- borderRadius: 8,
- p: "$6",
- width: 300,
- backgroundColor: "$panel",
- lineHeight: "normal",
- boxShadow:
- "hsl(206 22% 7% / 35%) 0px 10px 38px -10px, hsl(206 22% 7% / 20%) 0px 10px 20px -15px",
- "@media (prefers-reduced-motion: no-preference)": {
- animationDuration: "400ms",
- animationTimingFunction: "cubic-bezier(0.16, 1, 0.3, 1)",
- willChange: "transform, opacity",
- '&[data-state="open"]': {
- '&[data-side="top"]': { animationName: slideDownAndFade },
- '&[data-side="right"]': { animationName: slideLeftAndFade },
- '&[data-side="bottom"]': { animationName: slideUpAndFade },
- '&[data-side="left"]': { animationName: slideRightAndFade },
- },
- },
-});
-
-const HoverCardArrow = styled(HoverCardArrowBase, {
- fill: "$panel",
-});
-
-const Flex = styled("div", { display: "flex" });
-
-const NavDropdown = ({ trigger, children }) => (
-
-
- {trigger}
-
-
- {children}
-
-
-
-);
-
-export default NavDropdown;
diff --git a/packages/www/components/Site/Navigation/base.tsx b/packages/www/components/Site/Navigation/base.tsx
deleted file mode 100644
index 909b0154ac..0000000000
--- a/packages/www/components/Site/Navigation/base.tsx
+++ /dev/null
@@ -1,500 +0,0 @@
-import {
- Box,
- Button,
- Flex,
- Link as A,
- Container,
- DropdownMenu,
- DropdownMenuTrigger,
- DropdownMenuContent,
- DropdownMenuItem,
- DropdownMenuGroup,
-} from "@livepeer/design-system";
-import { useApi } from "hooks";
-import React, { useCallback, useEffect, useState } from "react";
-import Menu from "./mobile/menu";
-import { useRouter } from "next/router";
-import NavigationBreadcrumb, { BreadcrumbItem } from "./breadcrumb";
-import Link from "next/link";
-import { FiChevronDown, FiChevronRight, FiArrowUpRight } from "react-icons/fi";
-import Guides from "components/Site/Guides";
-
-const sidesWidth = "250px"; // We provide the same value for the logo and the CTAs so the center links are really centered.
-
-export const StyledServerIcon = ({ ...props }) => (
-
-
-
-);
-
-type Props = {
- links;
- breadcrumb?: BreadcrumbItem[];
- withShadow?: boolean;
- navBackgroundColor?: string;
- css?: any;
-};
-
-const NavigationBase = ({
- links,
- breadcrumb,
- navBackgroundColor = "transparent",
- css,
-}: Props) => {
- const { pathname } = useRouter();
- const [_hasScrolled, setHasScrolled] = useState(false);
- const [mobileMenuIsOpen, setMobileMenuIsOpen] = useState(false);
- const [loggedIn, setLoggedIn] = useState(false);
- const { token, user, logout } = useApi();
- const isDashboard = pathname.includes("/dashboard/");
-
- const handleScroll = useCallback(() => {
- const { scrollTop } = document.documentElement;
- if (scrollTop > 0) setHasScrolled(true);
- else setHasScrolled(false);
- }, []);
-
- useEffect(() => {
- handleScroll();
- document.addEventListener("scroll", handleScroll);
-
- return () => {
- document.removeEventListener("scroll", handleScroll);
- };
- }, []);
-
- useEffect(() => {
- if (token) {
- setLoggedIn(true);
- } else {
- setLoggedIn(false);
- }
- }, [token]);
-
- const ChevronLinkStyles = {
- display: "flex",
- gap: "$1",
- ai: "center",
- "&:hover": {
- ".chevronRight": {
- paddingLeft: "3px",
- transition: ".2s",
- },
- textDecoration: "none",
- },
- };
-
- return (
-
-
-
-
-
-
-
-
-
-
-
- {links.map((link, i) => {
- return link?.children ? (
-
-
-
- {link.label}
-
-
-
-
-
-
- {link.children.map((child, i) => {
- return (
-
-
-
-
- {child.icon}
-
-
-
- {child.label}
-
-
-
- {child.excerpt}
-
-
-
-
-
- );
- })}
-
-
-
- Use Cases
-
-
-
-
- Social Apps{" "}
-
-
-
-
-
- Creator Economy{" "}
-
-
-
-
-
- Compare Livepeer Studio
-
-
-
-
- Livepeer Studio vs Mux
-
-
-
-
-
- Livepeer Studio vs Cloudflare Stream
-
-
-
-
-
-
-
-
- ) : (
-
-
- {link.label}
- {link.isExternal && }
-
-
- );
- })}
-
-
- {!loggedIn && (
-
-
-
-
-
-
-
- )}
- {!loggedIn && (
-
-
-
-
-
-
-
- )}
- {loggedIn && (
-
- {isDashboard && (
-
- Docs
-
- )}
- {isDashboard && (
-
- Contact
-
- )}
-
- {!isDashboard && (
-
-
-
-
-
- )}
-
- )}
-
-
-
- setMobileMenuIsOpen(true)}>
- Menu
-
-
-
-
-
-
-
-
- );
-};
-
-export default NavigationBase;
diff --git a/packages/www/components/Site/Navigation/breadcrumb/dropdown.tsx b/packages/www/components/Site/Navigation/breadcrumb/dropdown.tsx
deleted file mode 100644
index 3d0df8d67f..0000000000
--- a/packages/www/components/Site/Navigation/breadcrumb/dropdown.tsx
+++ /dev/null
@@ -1,61 +0,0 @@
-import { useEffect } from "react";
-import { Box } from "@livepeer/design-system";
-
-type Props = {
- children: React.ReactNode;
- isOpen: boolean;
- close: () => any;
- id?: string;
- css?: any;
-};
-
-const BreadcrumbDropdown = ({ children, isOpen, close, id, css }: Props) => {
- function handleClick(e: any) {
- const isInside = e?.target?.closest(`#dropdown-${id}`) !== null;
- if (isInside) return;
- close();
- document.removeEventListener("click", handleClick);
- }
-
- useEffect(() => {
- if (isOpen) document.addEventListener("click", handleClick);
- return () => document.removeEventListener("click", handleClick);
- }, [isOpen]);
-
- if (!isOpen) return null;
- return (
-
-
-
-
- {children}
-
- );
-};
-
-export default BreadcrumbDropdown;
diff --git a/packages/www/components/Site/Navigation/breadcrumb/index.tsx b/packages/www/components/Site/Navigation/breadcrumb/index.tsx
deleted file mode 100644
index 73c2ad8db6..0000000000
--- a/packages/www/components/Site/Navigation/breadcrumb/index.tsx
+++ /dev/null
@@ -1,168 +0,0 @@
-import Logo from "components/Site/Logo";
-import { useState } from "react";
-import { Box, Link as A } from "@livepeer/design-system";
-import BreadcrumbDropdown from "./dropdown";
-import slugify from "@sindresorhus/slugify";
-import Link from "next/link";
-
-type LinkProps = React.ComponentProps;
-type MobileDropdownLink = LinkProps & { isSelected: boolean };
-
-export type BreadcrumbItem = LinkProps & {
- mobileDropdownLinks?: MobileDropdownLink[];
-};
-
-type Props = {
- breadcrumb?: BreadcrumbItem[];
- navBackgroundColor?: string;
-};
-
-const Divider = () => (
-
- /
-
-);
-
-const NavigationBreadcrumb = ({
- breadcrumb,
- navBackgroundColor = "transparent",
-}: Props) => {
- const [openDropdown, setOpenDropdown] = useState(false);
-
- if (breadcrumb) {
- return (
- <>
-
- {breadcrumb.map((item) => (
-
-
-
-
- {slugify(item.children.toString())}
-
-
- {item.mobileDropdownLinks && (
-
-
- {(() => {
- const { children, ...selectedProps } =
- item.mobileDropdownLinks.find((l) => l.isSelected) ??
- item.mobileDropdownLinks.find(
- (l) => l.href === "/docs/guides"
- );
- return (
- <>
-
- {slugify(
- children.toString() === "API Reference"
- ? "API"
- : children.toString()
- )}
-
- >
- );
- })()}
- setOpenDropdown(false)}
- css={{
- "@bp1": {
- right: "12px",
- },
- "@bp2": {
- right: "15px",
- },
- }}>
- {item.mobileDropdownLinks
- .filter((l) => !l.isSelected)
- .map((link) => (
-
-
- {link.children === "API Reference"
- ? "API"
- : link.children}
-
-
- ))}
-
-
- )}
-
- ))}
- >
- );
- }
- return ;
-};
-
-export default NavigationBreadcrumb;
diff --git a/packages/www/components/Site/Navigation/index.tsx b/packages/www/components/Site/Navigation/index.tsx
deleted file mode 100644
index a60eb8d03c..0000000000
--- a/packages/www/components/Site/Navigation/index.tsx
+++ /dev/null
@@ -1,81 +0,0 @@
-import React from "react";
-import NavigationBase from "./base";
-import { FiPlay, FiServer, FiVideo } from "react-icons/fi";
-
-const defaultNavProps = {
- links: [
- {
- label: "Product",
- href: "",
- children: [
- {
- href: "/on-demand",
- label: "On-demand",
- excerpt: "Build video into your product",
- icon: ,
- },
- {
- href: "/live",
- label: "Live",
- excerpt: "Livestream to millions",
- icon: ,
- },
- {
- href: "/transcoding",
- label: "Transcoding",
- excerpt: "Affordable and scalable transcoding",
- icon: ,
- },
- ],
- },
- {
- label: "Customers",
- href: "/customers",
- },
- // {
- // label: "Use Cases",
- // href: "/use-cases",
- // children: [
- // {
- // href: "/social-media",
- // label: "Social Apps",
- // },
- // {
- // href: "/creator-economy",
- // label: "Creator Economy",
- // },
- // ],
- // },
- // {
- // href: "/compare",
- // label: "Compare",
- // },
- {
- href: "/pricing",
- label: "Pricing",
- },
- {
- href: "https://docs.livepeer.studio",
- label: "Docs",
- isExternal: true,
- },
- // {
- // label: "Blog",
- // href: "/blog",
- // },
- {
- isExternal: true,
- href: "https://livepeer.typeform.com/to/HTuUHdDR#lead_source=Website%20-%20Contact%20an%20Expert&contact_owner=xxxxx",
- label: "Talk to an expert",
- },
- ],
-};
-
-const DefaultNav = ({ navBackgroundColor = "$loContrast" }) => (
-
-);
-
-export { DefaultNav };
diff --git a/packages/www/components/Site/Navigation/mobile/authButtons.tsx b/packages/www/components/Site/Navigation/mobile/authButtons.tsx
deleted file mode 100644
index 5a7e7b022c..0000000000
--- a/packages/www/components/Site/Navigation/mobile/authButtons.tsx
+++ /dev/null
@@ -1,41 +0,0 @@
-import { Link as A } from "@livepeer/design-system";
-import Link from "next/link";
-import Button from "components/Site/Button";
-
-const AuthButtons = ({
- isTokenDefined,
- isAdminUser,
- setMobileMenuIsOpen,
-}: {
- isTokenDefined: boolean;
- isAdminUser: boolean;
- setMobileMenuIsOpen: React.Dispatch>;
-}) => {
- if (!isTokenDefined) {
- return (
-
-
-
- );
- }
-
- return (
- <>
-
-
-
- {isAdminUser && (
-
- Admin
-
- )}
- >
- );
-};
-
-export default AuthButtons;
diff --git a/packages/www/components/Site/Navigation/mobile/menu.tsx b/packages/www/components/Site/Navigation/mobile/menu.tsx
deleted file mode 100644
index e90fcc4daa..0000000000
--- a/packages/www/components/Site/Navigation/mobile/menu.tsx
+++ /dev/null
@@ -1,124 +0,0 @@
-import {
- Box,
- Flex,
- Container,
- Link as A,
- Button as StyledButton,
-} from "@livepeer/design-system";
-import { User } from "@livepeer.studio/api";
-import Link from "next/link";
-import { BreadcrumbItem } from "../breadcrumb";
-import { useEffect, useState } from "react";
-import AuthButtons from "./authButtons";
-
-const Menu = ({
- mobileMenuIsOpen,
- setMobileMenuIsOpen,
- token,
- user,
- links,
-}: {
- links: any;
- breadcrumb?: BreadcrumbItem[];
- mobileMenuIsOpen: boolean;
- setMobileMenuIsOpen: React.Dispatch>;
- token: string | undefined;
- user: User | undefined;
-}) => {
- const [authButtons, setAuthButtons] = useState();
-
- useEffect(() => {
- setAuthButtons(
-
- );
- }, [token, user, setMobileMenuIsOpen]);
-
- const handleClick = (e: React.MouseEvent) => {
- if (e.target === e.currentTarget) setMobileMenuIsOpen(false);
- };
-
- return (
-
- setMobileMenuIsOpen(false)}>
- Close
-
-
-
- {links.map((link) => {
- return (
-
- setMobileMenuIsOpen(false)}
- css={{
- mb: "$4",
- fontSize: "$8",
- textDecoration: "none",
- display: link.children ? "none" : "block",
- "&:last-of-type": {
- mb: 0,
- },
- }}>
- {link.label}
-
-
- );
- })}
-
-
- {authButtons}
-
-
-
- );
-};
-
-export default Menu;
diff --git a/packages/www/components/Site/OffsetPortableText/index.tsx b/packages/www/components/Site/OffsetPortableText/index.tsx
deleted file mode 100644
index 5f90ab5cd9..0000000000
--- a/packages/www/components/Site/OffsetPortableText/index.tsx
+++ /dev/null
@@ -1,127 +0,0 @@
-import { Text, Link as A, Box as LiveBox } from "@livepeer/design-system";
-import { Container, Box } from "@theme-ui/components";
-import Button from "../../../components/Site/Button";
-import { PortableText } from "@portabletext/react";
-import Link from "next/link";
-
-function CustomLinkResolver({ button }) {
- const { url } = button;
-
- return (
-
-
-
- );
-}
-
-export default function OffsetPortableText({ title, portableText, buttons }) {
- return (
- <>
-
-
-
-
-
-
- {title}
-
- {portableText && }
-
- {buttons && (
-
- {Array.isArray(buttons) &&
- buttons.map((button) => (
-
- ))}
-
- )}
-
-
-
-
-
-
-
- >
- );
-}
diff --git a/packages/www/components/Site/OneAPI/index.tsx b/packages/www/components/Site/OneAPI/index.tsx
deleted file mode 100644
index a908f90417..0000000000
--- a/packages/www/components/Site/OneAPI/index.tsx
+++ /dev/null
@@ -1,251 +0,0 @@
-import {
- Container,
- Box,
- Heading,
- Text,
- Flex,
- Grid,
-} from "@livepeer/design-system";
-import {
- Tabs,
- TabsList,
- TabsTrigger,
- TabsContent,
-} from "@livepeer/design-system";
-import { MdTaskAlt } from "react-icons/md";
-import Guides from "components/Site/Guides";
-
-const workflows = [
- {
- selected: true,
- title: "🔴 Live",
- description: (
-
- Build live video experiences with just a few lines of code.
-
- ),
- list: [
- {
- heading: "10x viewer engagement through realtime live streaming",
- subheading:
- "Build rich interactive live streaming experiences, enabled by sub 1-second latency and near-perfect uptime.",
- },
- {
- heading: "Go live effortlessly from any source",
- subheading:
- "Stream seamlessly from mobile apps, open broadcast software, or a web browser, and protect your streams with flexible playback policies.",
- },
- {
- heading: "Get real-time metrics and analytics on your viewership",
- subheading:
- "See performance data to understand audience demographics, engagement and improve your viewers’ experience.",
- },
- {
- heading: "Reach a global audience through auto scaling",
- subheading:
- "Enable high performance geographic coverage at a global scale, without managing any infrastructure.",
- },
- ],
- },
- {
- title: "⏯️ On-demand",
- description: (
-
- Deliver high-quality on-demand video experiences to viewers worldwide.
-
- ),
- list: [
- {
- heading: "Upload any common video format",
- subheading:
- "The Livepeer Network ensures standardization for seamless playback on any device or connection.",
- },
- {
- heading: "Ensure high-quality, optimized streaming",
- subheading:
- "Livepeer generates multiple video resolutions ensuring an optimized streaming experience based on the user's device and available bandwidth.",
- },
- {
- heading: "Understand your audience",
- subheading:
- "Leveraging real-time engagement metrics such as view counts and watch time.",
- },
- {
- heading: "Optimize the viewer experience",
- subheading:
- "Monitor and optimize the viewer experience with performance metrics such as error rate, time to first frame, and more.",
- },
- ],
- },
- {
- title: "🔄 Transcode",
- description: (
-
- Tap into a global network of always-on transcoding providers.
-
- ),
- list: [
- {
- heading: "Write results to any S3-compatible storage provider",
- subheading:
- "Livepeer’s transcoding pipeline is designed to plug and play with any S3-compatible storage provider.",
- },
- {
- heading: "Scale your transcoding capacity without limits",
- subheading:
- "The Livepeer Network's represents enough bandwidth to transcode all the real-time video streaming through Twitch, Facebook, and Youtube combined.",
- },
- {
- heading: "Save 10x on transcoding costs",
- subheading:
- "Livepeer, a people-powered network, avoids cloud computing competition with Google Cloud and AWS, offering cost-effective usage-based pricing, not reserved server space.",
- },
- ],
- },
-];
-
-const TT = ({ title, value }) => (
-
- {title}
-
-);
-
-export const StartBuilding = ({ backgroundColor = "$loContrast" }) => (
-
-
-
-
-
- One API for all your video workflows
-
-
-
-
- {workflows.map(({ title }, i) => (
-
- ))}
-
- {workflows.map(({ list }, i) => {
- return (
-
-
- {workflows[i].description}
-
-
-
- {list?.map(({ heading, subheading }, i) => {
- return (
-
-
-
-
-
-
-
- {heading}
-
- {subheading}
-
-
-
- );
- })}
-
-
- );
- })}
-
-
-
-);
-
-export default StartBuilding;
diff --git a/packages/www/components/Site/Prefooter/index.tsx b/packages/www/components/Site/Prefooter/index.tsx
deleted file mode 100644
index a89a22765e..0000000000
--- a/packages/www/components/Site/Prefooter/index.tsx
+++ /dev/null
@@ -1,123 +0,0 @@
-import {
- Container,
- Heading,
- Text,
- Flex,
- Box,
- Link as A,
- Button,
-} from "@livepeer/design-system";
-import { FiArrowUpRight } from "react-icons/fi";
-import Guides from "../Guides";
-import Link from "next/link";
-
-const Prefooter = ({ backgroundColor = "inherit" }) => (
-
-
-
-
-
- Ready to get started?
-
-
- Experience the world's open video infrastructure. Stream your first
- video in just a few clicks.
-
-
-
-
-
-
-
-
-
-
-
-
-
-);
-
-export default Prefooter;
diff --git a/packages/www/components/Site/Pricing/faq.md b/packages/www/components/Site/Pricing/faq.md
deleted file mode 100644
index b4821efee7..0000000000
--- a/packages/www/components/Site/Pricing/faq.md
+++ /dev/null
@@ -1,58 +0,0 @@
-## FAQs
-
-### **How much does Livepeer Studio cost compared to traditional video development platforms?**
-
-Livepeer Studio provides video processing at a 5-10x cost saving compared to
-traditional video development platforms. [Learn more](/compare) about how it
-compares to other video infrastructure providers.
-
-### **I am building with Livepeer Studio at a hackathon. Is there a cost to stream?**
-
-In the hundreds of hackathon projects that were built using Livepeer Studio,
-none have ever exceeded the alloted free minutes provided in the Hacker plan. If
-this is a concern, email Livepeer Studio at
-[help@livepeer.studio](mailto:help@livepeer.studio) or reach out
-on [Discord](https://discord.gg/livepeer).
-
-### **Do I need to provide a credit card number to create an account?**
-
-A credit card is not required to create an account.
-
-### **Are there usage limits for the Hacker plan?**
-
-Yes.
-
-There are monthly caps for storage (1,000 minutes), transcode (1,000 minutes),
-and delivery (10,000 minutes) usage; after these limits are reached in any
-month, you will not be able to ingest or deliver any additional video until you
-select a plan. Please note that transcode and delivery usage is calculated on a
-monthly basis, but storage carries over from month to month unless you
-explicitly delete stored assets (i.e., if you store 500 minutes of video in one
-month, you will start the next month with 500 minutes already stored).
-
-Hacker tier users will receive email notifications at 75%, 90%, and 100% of
-usage.
-
-Additionally, Hacker plans are limited to 30 concurrent viewers per stream. This
-is a hard cap and cannot be exceeded.
-
-### **What happens if I exceed the allotted minutes for the Hacker plan?**
-
-If you exceed the allotted minutes for storage, transcode, or delivery usage on
-a Hacker account, your account will be disabled until you select a paid plan.
-
-### **What currencies does Livepeer Studio accept?**
-
-USD is the only currency accepted right now via the Livepeer Studio dashboard.
-Crypto-native payments are coming soon. If you prefer to pay with cryptocurrency
-now, you may reach out at [help@livepeer.studio](mailto:help@livepeer.studio)
-
-### **How are transcoding, storage, and delivery minutes derived?**
-
-For transcode and storage, Livepeer Studio uses the duration of the source
-asset, and for delivery, we estimate the minutes viewed based on the average
-bitrate and the total amount of data used.
-
-If you have further questions about these calculations or feel that they do not
-accurately reflect the characteristics of your project's usage, you may reach
-out at [help@livepeer.studio](mailto:help@livepeer.studio)
diff --git a/packages/www/components/Site/Pricing/index.tsx b/packages/www/components/Site/Pricing/index.tsx
deleted file mode 100644
index a0df15695e..0000000000
--- a/packages/www/components/Site/Pricing/index.tsx
+++ /dev/null
@@ -1,561 +0,0 @@
-import { Box, Grid, Flex, Text, Tooltip } from "@livepeer/design-system";
-import PricingCard, { PricingCardContent } from "components/Site/PricingCard";
-
-const PricingCardsContainer = () => {
- return (
-
-
-
-
- Features
-
-
-
-
- Transcoding
-
-
-
-
-
-
- Delivery
-
-
-
-
-
-
- Storage
-
-
-
-
-
- {/* Hacker */}
-
-
-
-
- Transcoding
-
-
- 1,000 minutes{" "}
-
-
-
-
- Delivery
-
-
- 10,000 minutes{" "}
-
-
-
-
- Storage
-
-
- 1,000 minutes{" "}
-
-
-
-
-
- {/* Growth */}
-
-
-
-
- Transcoding
-
-
- 3,000 minutes{" "}
-
-
- $
-
-
-
-
-
-
- Delivery
-
-
- 100,000 minutes{" "}
-
-
- $
-
-
-
-
-
-
- Storage
-
-
- 10,000 minutes{" "}
-
-
- $
-
-
-
-
- *Pay as you go past allotted minutes
-
-
-
-
-
- {/* Scale */}
-
-
-
-
- Transcoding
-
-
- 20,000 minutes{" "}
-
-
- $
-
-
-
-
-
-
- Delivery
-
-
- 500,000 minutes{" "}
-
-
- $
-
-
-
-
-
-
- Storage
-
-
- 50,000 minutes{" "}
-
-
- $
-
-
-
-
- *Pay as you go past allotted minutes
-
-
-
-
-
- {/* Enterprise */}
-
-
-
-
- Transcoding
-
-
- Custom pricing
-
-
-
-
- Delivery
-
-
- Custom pricing
-
-
-
-
- Storage
-
-
- Custom pricing
-
-
-
-
-
-
- );
-};
-
-export default PricingCardsContainer;
diff --git a/packages/www/components/Site/PricingCalculator/Calculator.tsx b/packages/www/components/Site/PricingCalculator/Calculator.tsx
deleted file mode 100644
index 00ba69f71d..0000000000
--- a/packages/www/components/Site/PricingCalculator/Calculator.tsx
+++ /dev/null
@@ -1,575 +0,0 @@
-import { ReactNode, useCallback } from "react";
-import { useApi } from "hooks";
-import { Box, Grid, Flex, Text, TextField } from "@livepeer/design-system";
-import Button from "components/Site/Button";
-import { useRouter } from "next/router";
-
-type PreviewItemProps = {
- title: string;
- description?: string;
- value: string;
- valueClarification?: string;
- children?: ReactNode;
- color?: string;
-};
-
-type PreviewProps = {
- transcoding: number;
- streaming: number;
-};
-
-type CalculatorItemProps = {
- title: string;
- children: ReactNode;
- min: number;
- max: number;
- value?: number | undefined | null;
- setValue?: React.Dispatch>;
- marginTop?: string;
- step?: number;
-};
-
-type ScaleCalculatorProps = {
- value: number;
- percentageWatched: number;
- setPercentageWatched: React.Dispatch>;
-};
-
-type CalculatorProps = {
- streamLength: number;
- monthlyStreams: number;
- viewCount: number;
- setStreamLength: React.Dispatch>;
- setMonthlyStreams: React.Dispatch>;
- setViewCount: React.Dispatch>;
- percentageWatched: number;
- setPercentageWatched: React.Dispatch>;
-};
-
-const scaleCalculatorValues = [25, 50, 75, 100];
-
-const CalculatorItem = ({
- title,
- children,
- max,
- min,
- value,
- setValue,
- step,
-}: CalculatorItemProps) => {
- const handleChange = (e) => {
- const value = e.target.value;
- setValue(parseFloat(value));
- };
-
- const handleInput = useCallback(
- (e) => {
- const { value, min, max } = e.target;
- const realValue = ((value - min) / (max - min)) * 100;
- e.target.style.background = `linear-gradient(to right, #6e56cf ${realValue}%, #E1E1E1 0%)`;
- },
- [value, min, max]
- );
-
- return (
-
-
- {title}
-
-
- {children}
-
-
-
- );
-};
-
-const ScaleCalculator = ({
- value,
- percentageWatched,
- setPercentageWatched,
-}: ScaleCalculatorProps) => {
- const handleClick = () => {
- if (percentageWatched === value) {
- setPercentageWatched(0);
- } else {
- setPercentageWatched(value);
- }
- };
- return (
-
-
- {value}%
-
-
- );
-};
-
-const Calculator = ({
- streamLength,
- monthlyStreams,
- viewCount,
- setStreamLength,
- setMonthlyStreams,
- setViewCount,
- percentageWatched,
- setPercentageWatched,
-}: CalculatorProps) => {
- const streamLengthDividedTime = {
- hours: parseFloat((streamLength / 60 / 60).toString().split(".")[0]),
- minutes: parseFloat(((streamLength / 60) % 60).toString().split(".")[0]),
- seconds: streamLength % 60,
- };
-
- const handleChange = useCallback(
- (e) => {
- const { name, value } = e.target;
- let seconds = 0;
- switch (name) {
- case "hours":
- seconds =
- streamLengthDividedTime.minutes * 60 +
- streamLengthDividedTime.seconds +
- value * 60 * 60;
- break;
- case "minutes":
- seconds =
- streamLengthDividedTime.hours * 60 * 60 +
- streamLengthDividedTime.seconds +
- value * 60;
- break;
- case "seconds":
- seconds =
- streamLengthDividedTime.hours * 60 * 60 +
- streamLengthDividedTime.minutes * 60 +
- value * 1;
- break;
- default:
- break;
- }
- setStreamLength(seconds > 0 ? seconds : 0);
- },
- [setStreamLength, streamLengthDividedTime, streamLength]
- );
-
- return (
-
-
- Usage
-
-
-
-
-
- :
-
- :
-
-
-
-
- hours
-
-
- minutes
-
-
- seconds
-
-
-
-
-
- {
- const monthly = parseFloat(e.target.value);
- setMonthlyStreams(monthly > 0 ? monthly : 0);
- }}
- />
-
-
- {
- const view = parseFloat(e.target.value);
- setViewCount(view > 0 ? view : 0);
- }}
- />
-
-
-
- What percentage of the stream does the average viewer watch?
-
-
- {scaleCalculatorValues.map((each, idx) => (
-
- ))}
-
-
-
- );
-};
-
-const PreviewItem = ({
- title,
- description,
- value,
- valueClarification,
- children,
-}: PreviewItemProps) => {
- return (
-
-
-
-
- {title}
-
-
-
- {description}
-
-
-
-
-
- {value}
-
-
- {valueClarification}
- {children}
-
-
-
- );
-};
-
-const Preview = ({ transcoding, streaming }: PreviewProps) => {
- const totalValue = parseFloat((transcoding + streaming).toFixed(2));
- const { token } = useApi();
- const router = useRouter();
-
- return (
-
-
- Monthly cost
-
- Prices listed in USD
-
-
- 3000 ? "Contact us" : `$${transcoding.toFixed(2)}`}
- color={totalValue > 3000 ? "rgba(0, 0, 0, 0.2)" : "black"}
- />
- 3000 ? "Contact us" : `$${streaming.toFixed(2)}`}
- color={totalValue > 3000 ? "rgba(0, 0, 0, 0.2)" : "black"}
- valueClarification="*coming soon"
- />
- 3000 ? "Contact us" : "Coming Soon"}
- color={totalValue > 3000 ? "rgba(0, 0, 0, 0.2)" : "black"}
- />
- 3000 ? "Contact us" : `$${totalValue}`}
- valueClarification={
- totalValue > 3000
- ? ""
- : `$${transcoding.toFixed(2)} + $${streaming.toFixed(2)}`
- }
- color={totalValue > 3000 ? "rgba(0, 0, 0, 0.2)" : "black"}
- />
- {transcoding + streaming > 500 && (
-
- {totalValue > 3000
- ? "Contact us For High Volume Discounts"
- : "High Volume Discounts Available"}
-
- )}
-
-
- );
-};
-
-export { Preview, Calculator };
diff --git a/packages/www/components/Site/PricingCalculator/index.tsx b/packages/www/components/Site/PricingCalculator/index.tsx
deleted file mode 100644
index 703139e929..0000000000
--- a/packages/www/components/Site/PricingCalculator/index.tsx
+++ /dev/null
@@ -1,67 +0,0 @@
-import { useState } from "react";
-import { Calculator, Preview } from "./Calculator";
-import { Box, Grid, Heading, Text } from "@livepeer/design-system";
-
-const PricingCalculator = () => {
- const [streamLength, setStreamLength] = useState(600);
- const [monthlyStreams, setMonthlyStreams] = useState(100);
- const [viewCount, setViewCount] = useState(500);
- const [percentageWatched, setPercentageWatched] = useState(75);
-
- const transcoding = (streamLength / 60) * monthlyStreams * 0.005;
-
- const streaming =
- ((60 * (streamLength / 60) * monthlyStreams * 2000) / 8 / 1024 / 1024) *
- viewCount *
- (percentageWatched / 100) *
- 0.02;
-
- return (
-
-
- Estimate your monthly costs
-
-
- Add details about your content and audience
-
-
-
-
-
-
- );
-};
-
-export default PricingCalculator;
diff --git a/packages/www/components/Site/PricingCard/index.tsx b/packages/www/components/Site/PricingCard/index.tsx
deleted file mode 100644
index cdd1b46380..0000000000
--- a/packages/www/components/Site/PricingCard/index.tsx
+++ /dev/null
@@ -1,101 +0,0 @@
-import { ReactNode } from "react";
-import { Box, Flex, Text, Button, Link as A } from "@livepeer/design-system";
-
-export type PricingCardProps = {
- pricingTitle: string;
- titleColor?: string;
- bc: string;
- pricingDescription: ReactNode | string;
- btn: { href: string; display: string; bc?: string; color?: string };
- children: ReactNode;
- className?: string;
- color?: string;
-};
-
-export type PricingCardContentProps = {
- children?: ReactNode;
-};
-
-export const PricingCardContent = ({ children }: PricingCardContentProps) => {
- return (
-
- {children}
-
- );
-};
-
-const PricingCard = ({
- pricingTitle,
- bc,
- pricingDescription,
- btn,
- children,
- color = "$hiContrast",
-}: PricingCardProps) => {
- return (
-
-
-
- {pricingTitle}
-
-
- {pricingDescription}
-
-
-
-
-
- {children}
-
- );
-};
-
-export default PricingCard;
diff --git a/packages/www/components/Site/PrinciplesSection/index.tsx b/packages/www/components/Site/PrinciplesSection/index.tsx
deleted file mode 100644
index 2403ebd12a..0000000000
--- a/packages/www/components/Site/PrinciplesSection/index.tsx
+++ /dev/null
@@ -1,89 +0,0 @@
-import { Container, Box, Flex, Heading, Text } from "@livepeer/design-system";
-import BulletedTitle from "components/Site/BulletedTitle";
-
-const PrinciplesSection = ({ content }) => {
- return (
-
-
-
-
- Product Principles
-
-
- {content.heading}
-
-
-
-
-
- {content.body}
-
-
-
- {(content.principles ?? []).map((principle, i) => (
- {principle}
- ))}
-
-
-
-
- );
-};
-
-export default PrinciplesSection;
diff --git a/packages/www/components/Site/RegionSelector/index.tsx b/packages/www/components/Site/RegionSelector/index.tsx
deleted file mode 100644
index db8b294bf1..0000000000
--- a/packages/www/components/Site/RegionSelector/index.tsx
+++ /dev/null
@@ -1,125 +0,0 @@
-import {
- Box,
- Flex,
- DropdownMenu,
- DropdownMenuContent,
- DropdownMenuCheckboxItem,
- DropdownMenuTrigger,
-} from "@livepeer/design-system";
-import { CheckIcon, ChevronDownIcon } from "@radix-ui/react-icons";
-import { useRouter } from "next/router";
-import { useState } from "react";
-
-const Item = ({ active = false, language, locale, flag, ...props }) => (
-
- <>
-
- {flag}
- {language}
-
- {active && (
-
-
-
- )}
- >
-
-);
-
-const items = [
- {
- flag: "🇺🇸",
- language: "English",
- locale: "en",
- },
- {
- flag: "🇪🇸",
- language: "Spanish",
- locale: "es",
- },
-];
-
-const LanguageDropdown = ({ navBackgroundColor }) => {
- const router = useRouter();
- const { locale, pathname, asPath } = router;
- const [isOpen, setIsOpen] = useState(false);
-
- return (
- setIsOpen(open)}>
-
-
- {router.locale}
-
- {items.filter((item) => item.locale === router.locale)[0]?.flag}
-
-
-
-
-
- {items.map((item, i) => (
- -
- router.push(pathname, asPath, { locale: item.locale })
- }
- flag={item.flag}
- active={locale === item.locale ? true : false}
- language={item.language}
- locale="en"
- />
- ))}
-
-
- );
-};
-
-export default LanguageDropdown;
diff --git a/packages/www/components/Site/Serializers/index.tsx b/packages/www/components/Site/Serializers/index.tsx
deleted file mode 100644
index 80ec819dbd..0000000000
--- a/packages/www/components/Site/Serializers/index.tsx
+++ /dev/null
@@ -1,11 +0,0 @@
-import EmbedHtml from "components/Site/EmbedHtml";
-import Figure from "components/Site/Figure";
-
-const serializers = {
- types: {
- EmbedHtml: EmbedHtml,
- figure: Figure,
- },
-};
-
-export default serializers;
diff --git a/packages/www/components/Site/SimpleBlockContent/index.tsx b/packages/www/components/Site/SimpleBlockContent/index.tsx
deleted file mode 100644
index 85df008eed..0000000000
--- a/packages/www/components/Site/SimpleBlockContent/index.tsx
+++ /dev/null
@@ -1,54 +0,0 @@
-import BlockContent from "@sanity/block-content-to-react";
-import Serializers from "components/Site/Serializers";
-import { Box } from "@livepeer/design-system";
-
-const SimpleBlockContent = (props) => {
- const { blocks } = props;
-
- if (!blocks) {
- console.error("Missing blocks");
- return null;
- }
-
- return (
-
-
-
- );
-};
-
-export default SimpleBlockContent;
diff --git a/packages/www/components/Site/SocialProof/index.tsx b/packages/www/components/Site/SocialProof/index.tsx
deleted file mode 100644
index ded212ed5a..0000000000
--- a/packages/www/components/Site/SocialProof/index.tsx
+++ /dev/null
@@ -1,70 +0,0 @@
-import React from "react";
-import { Container, Box } from "@theme-ui/components";
-import { Text, Box as LiveBox } from "@livepeer/design-system";
-import { urlFor } from "lib/client";
-import Image from "next/image";
-
-const SocialProof = ({ icons, title }) => {
- return (
-
-
-
- {title}
-
-
- {icons &&
- Array.isArray(icons) &&
- icons.map((icon) => (
-
-
-
- ))}
-
-
-
- );
-};
-export default SocialProof;
diff --git a/packages/www/components/Site/SplitImage/index.tsx b/packages/www/components/Site/SplitImage/index.tsx
deleted file mode 100644
index 70427b7088..0000000000
--- a/packages/www/components/Site/SplitImage/index.tsx
+++ /dev/null
@@ -1,44 +0,0 @@
-import { urlFor } from "../../../lib/client";
-import { Box } from "@livepeer/design-system";
-import { PortableText } from "@portabletext/react";
-import Image from "next/image";
-
-export default function SplitImage({
- inverted,
- title,
- defaultImage,
- portableText,
-}) {
- return (
-
-
-
- {portableText && }
-
-
- );
-}
diff --git a/packages/www/components/Site/TableOfContents/bullet-svg.tsx b/packages/www/components/Site/TableOfContents/bullet-svg.tsx
deleted file mode 100644
index 79671c1b9e..0000000000
--- a/packages/www/components/Site/TableOfContents/bullet-svg.tsx
+++ /dev/null
@@ -1,15 +0,0 @@
-const BulletSvg = () => (
-
-);
-
-export default BulletSvg;
diff --git a/packages/www/components/Site/TableOfContents/index.tsx b/packages/www/components/Site/TableOfContents/index.tsx
deleted file mode 100644
index d4bf53ed71..0000000000
--- a/packages/www/components/Site/TableOfContents/index.tsx
+++ /dev/null
@@ -1,222 +0,0 @@
-import { Box, Flex } from "@livepeer/design-system";
-import Link from "next/link";
-import { useRouter } from "next/router";
-import { useState } from "react";
-import { FiChevronDown, FiChevronUp } from "react-icons/fi";
-import BulletSvg from "./bullet-svg";
-
-type Heading = { content: string; slug?: string; iconComponentName?: string };
-export type Tree = [Heading, Tree[]] | [];
-
-type Props = {
- tree: Tree[];
- onClose?: (() => void) | null;
- ignoreList?: string[];
-};
-
-function flatten(items) {
- const flat = [];
-
- items.forEach((item) => {
- if (Array.isArray(item)) {
- flat.push(...flatten(item));
- } else {
- flat.push(item);
- }
- });
-
- return flat;
-}
-
-const IconContainer = ({ children }) => (
-
- {children}
-
-);
-
-const TableOfContents = ({ onClose = null, tree, ignoreList = [] }: Props) => {
- function renderHeading(
- heading: Heading,
- hasChildren = false,
- isChildren = false
- ) {
- const { pathname } = useRouter();
- const isActive = pathname === heading.slug;
-
- const Icon =
- require(`react-icons/fi`)[heading.iconComponentName] ?? BulletSvg;
-
- if (heading === undefined || ignoreList.includes(heading.content)) {
- return null;
- }
-
- if (hasChildren) {
- return (
-
-
-
-
- {heading.content}
-
- );
- }
- const labelStyles = {
- fontSize: "10px",
- color: "white",
- fontWeight: 600,
- px: 2,
- py: "2px",
- borderRadius: 4,
- };
- return (
-
-
-
-
-
-
- {heading.content}
-
-
-
- );
- }
-
- function renderChildren(children: Tree[]) {
- if (children.length === 0) {
- return null;
- }
-
- return (
- <>
- {children.map((child, i) => (
- {renderPair(child, true)}
- ))}
- >
- );
- }
-
- function renderPair(pair: Tree, isChildren = false) {
- const [isOpen, setIsOpen] = useState(false);
- const [heading, children] = pair;
- const hasChildren = children?.length > 0;
- const router = useRouter();
- const isActive = flatten(children).filter(
- (obj) => obj.slug === router?.pathname
- ).length;
- if (ignoreList.includes(heading.content)) return <>>;
- return (
- <>
- setIsOpen(isOpen ? false : true)}
- css={{
- cursor: "pointer",
- alignItems: "center",
- justifyContent: "space-between",
- }}>
- {renderHeading(heading, hasChildren, isChildren)}
- {hasChildren && (
- <>
- {isOpen || isActive ? (
-
-
-
- ) : (
-
-
-
- )}
- >
- )}
-
- {hasChildren && (
-
- {renderChildren(children)}
-
- )}
- >
- );
- }
-
- function render(tree: Tree) {
- const [heading, children] = tree;
-
- let Toc = renderPair(tree);
-
- if (heading) {
- Toc = renderPair(tree);
- } else {
- Toc = renderChildren(children);
- }
- return Toc;
- }
-
- return (
- <>
- {tree.map((t, i) => (
- {render(t)}
- ))}
- >
- );
-};
-
-export default TableOfContents;
diff --git a/packages/www/components/Site/TeamMember/index.tsx b/packages/www/components/Site/TeamMember/index.tsx
deleted file mode 100644
index 421ccd0d89..0000000000
--- a/packages/www/components/Site/TeamMember/index.tsx
+++ /dev/null
@@ -1,147 +0,0 @@
-import { Box, Flex, Heading, Text, Link as A } from "@livepeer/design-system";
-import imageUrlBuilder from "@sanity/image-url";
-import { client } from "lib/client";
-import { FaTwitter, FaMedium, FaGithub, FaLinkedin } from "react-icons/fa";
-import Image from "next/image";
-
-const TeamMember = ({
- fullname,
- image,
- role,
- twitter,
- github,
- linkedin,
- medium,
- css = {},
- ...props
-}) => {
- const builder = imageUrlBuilder(client as any);
-
- return (
-
-
-
-
-
-
-
- {fullname}
-
-
- {role}
-
-
-
-
- {twitter && (
-
-
-
- )}
- {linkedin && (
-
-
-
- )}
- {medium && (
-
-
-
- )}
- {github && (
-
-
-
- )}
-
-
- );
-};
-
-export default TeamMember;
diff --git a/packages/www/components/Site/TeamSection/index.tsx b/packages/www/components/Site/TeamSection/index.tsx
deleted file mode 100644
index 913ad9dca6..0000000000
--- a/packages/www/components/Site/TeamSection/index.tsx
+++ /dev/null
@@ -1,51 +0,0 @@
-import { Text, Box, Grid } from "@livepeer/design-system";
-import TeamMember from "components/Site/TeamMember";
-
-const TeamSection = ({ teamMembers }) => {
- return (
- <>
-
- {teamMembers.map((t, i) => (
-
- ))}
-
- >
- );
-};
-
-export default TeamSection;
diff --git a/packages/www/components/Site/Testimonials/Card.tsx b/packages/www/components/Site/Testimonials/Card.tsx
deleted file mode 100644
index 195dfc8ee6..0000000000
--- a/packages/www/components/Site/Testimonials/Card.tsx
+++ /dev/null
@@ -1,85 +0,0 @@
-import { Box, Flex, Text } from "@livepeer/design-system";
-
-export type CardProps = {
- id: string;
- quote: string;
- logo: JSX.Element;
- author: {
- name: string;
- role: string;
- company: string;
- };
-};
-
-const Card = ({ id, logo, quote, author }: CardProps) => {
- return (
-
- {logo}
-
- "{quote}"
-
-
-
-
-
- {author.name}
-
-
- {author.role}, {author.company}
-
-
-
-
- );
-};
-
-export default Card;
diff --git a/packages/www/components/Site/Testimonials/index.tsx b/packages/www/components/Site/Testimonials/index.tsx
deleted file mode 100644
index 227f26b3d2..0000000000
--- a/packages/www/components/Site/Testimonials/index.tsx
+++ /dev/null
@@ -1,83 +0,0 @@
-import { Box, Grid, Container } from "@livepeer/design-system";
-import Card, { CardProps } from "./Card";
-import Guides from "components/Site/Guides";
-import CBSIcon from "../../../public/img/testimonials/cbs-interactive/logo.svg";
-import HousePartyIcon from "../../../public/img/testimonials/houseparty/logo.svg";
-import PlayDJIcon from "../../../public/img/testimonials/playdj-tv/logo.svg";
-
-const testimonials: CardProps[] = [
- {
- quote:
- "Livepeer Studio is an exciting video solution that’s highly reliable and price disruptive.",
- id: "cbs-interactive",
- logo: ,
- author: {
- name: "Flávio Ribeiro",
- role: "Director of Engineering",
- company: "CBS Interactive",
- },
- },
- {
- quote:
- "Livepeer Studio is an incredible team building the future of video services.",
- id: "houseparty",
- logo: ,
- author: {
- name: "Ben Rubin",
- role: "CEO",
- company: "Houseparty (acquired by Epic Games)",
- },
- },
- {
- quote:
- "Partnering with Livepeer Studio has allowed PlayDJ.tv to get ahead of our competitors through innovation and new technology.",
- id: "playdj-tv",
- logo: ,
- author: {
- name: "Tom Burman",
- role: "Co-Founder",
- company: "PlayDJ.TV",
- },
- },
-];
-
-const Testimonials = () => (
-
-
-
-
-
- {testimonials.map((testimonial, i) => (
-
- ))}
-
-
-
-
-);
-
-export default Testimonials;
diff --git a/packages/www/components/Site/TextSection/index.tsx b/packages/www/components/Site/TextSection/index.tsx
deleted file mode 100644
index 37f27a4659..0000000000
--- a/packages/www/components/Site/TextSection/index.tsx
+++ /dev/null
@@ -1,28 +0,0 @@
-import SimpleBlockContent from "../SimpleBlockContent";
-import { Container, Box } from "@livepeer/design-system";
-
-const TextSection = ({ text }) => (
-
-
-
-
-
-
-
-
-
-
-
-);
-
-export default TextSection;
diff --git a/packages/www/components/Site/ToolkitSection/index.tsx b/packages/www/components/Site/ToolkitSection/index.tsx
deleted file mode 100644
index 14335e545e..0000000000
--- a/packages/www/components/Site/ToolkitSection/index.tsx
+++ /dev/null
@@ -1,107 +0,0 @@
-import { Container, Box, Flex, Heading, Text } from "@livepeer/design-system";
-import Card from "components/Site/Card";
-import BulletedTitle from "components/Site/BulletedTitle";
-
-const ToolkitSection = ({ content }) => {
- return (
-
-
-
-
- Toolkit
-
-
- {content.Headline}
-
-
- {content.description}
-
-
-
-
-
-
-
-
-
-
-
-
-
- );
-};
-
-export default ToolkitSection;
diff --git a/packages/www/components/Site/TopNotification/index.tsx b/packages/www/components/Site/TopNotification/index.tsx
deleted file mode 100644
index 4e0080e776..0000000000
--- a/packages/www/components/Site/TopNotification/index.tsx
+++ /dev/null
@@ -1,71 +0,0 @@
-import { Box, Text, Link as A } from "@livepeer/design-system";
-import { FiArrowRight, FiArrowUpRight } from "react-icons/fi";
-import Link from "next/link";
-import { ReactNode } from "react";
-
-export type TopNotificationProps = {
- title?: string | ReactNode;
- description?: string;
- link: {
- label: string;
- href: string;
- asPath?: string;
- isExternal?: boolean;
- };
-};
-
-const TopNotification = ({ title, link }: TopNotificationProps) => (
-
- {title && {title}}
- {link.isExternal ? (
-
- {link.label}
-
-
-
-
- ) : (
-
-
- {link.label}
-
-
-
-
-
- )}
-
-);
-export default TopNotification;
diff --git a/packages/www/components/Site/Why/index.tsx b/packages/www/components/Site/Why/index.tsx
deleted file mode 100644
index fd3ccc3b6c..0000000000
--- a/packages/www/components/Site/Why/index.tsx
+++ /dev/null
@@ -1,222 +0,0 @@
-import { Container, Box, Flex, Text, Heading } from "@livepeer/design-system";
-import Guides from "components/Site/Guides";
-import Link from "next/link";
-import * as Hi from "react-icons/hi";
-import * as Fa from "react-icons/fa";
-import * as Fi from "react-icons/fi";
-import * as Md from "react-icons/md";
-import Button from "components/Site/Button";
-import ArrowLink from "components/Site/ArrowLink";
-import { FiArrowUpRight } from "react-icons/fi";
-
-const getIconProvider = (provider) => {
- if (provider === "hi") {
- return Hi;
- }
- if (provider === "fa") {
- return Fa;
- }
- if (provider === "fi") {
- return Fi;
- }
- if (provider === "mdi") {
- return Md;
- }
-};
-
-const Why = ({
- backgroundColor = "inherit",
- title = null,
- heading = null,
- description = null,
- reasons = null,
- columns = 3,
- alignment = "left",
- ctas = null,
-}) => {
- return (
-
-
-
-
- {heading && (
-
-
-
- {title}
-
-
- {heading}
-
-
-
- )}
- {description && (
-
- {description}
-
- )}
- {ctas && ctas?.length > 0 && (
-
-
-
-
- {ctas[1] && (
-
- {ctas[1]?.title}
-
- )}
-
- )}
-
-
- {reasons &&
- reasons.map((reason, i) => {
- return (
-
- {reason?.icon?.provider && (
-
- {getIconProvider(reason.icon.provider)[
- reason.icon.name
- ]()}
-
- )}
-
- {reason.title}
-
-
- {reason.description}
-
-
- );
- })}
-
-
-
- );
-};
-
-export default Why;
diff --git a/packages/www/content/index.tsx b/packages/www/content/index.tsx
index eb8e380d2e..22b2db556a 100644
--- a/packages/www/content/index.tsx
+++ b/packages/www/content/index.tsx
@@ -4,7 +4,9 @@
* @TODO: We will manage these contents from within the CMS in the future
*/
-const makeCompleteTitle = (title) => `${title} - Livepeer Studio`;
+import { getBrandName } from "lib/utils";
+
+const makeCompleteTitle = (title) => `${title} - ${getBrandName()}`;
const defaultDescription =
"Livepeer Studio is a high-performance video streaming platform that enables developers to build unique live and on-demand video experiences with up to 90% cost savings.";
const makeCompleteUrl = (suffix = "") => `https://livepeer.studio/${suffix}`;
@@ -13,7 +15,7 @@ const makeCompleteUrl = (suffix = "") => `https://livepeer.studio/${suffix}`;
export const Home = {
metaData: {
- title: "Livepeer Studio",
+ title: getBrandName(),
description: defaultDescription,
url: makeCompleteUrl(),
},
diff --git a/packages/www/hooks/use-api/endpoints/user.ts b/packages/www/hooks/use-api/endpoints/user.ts
index e327838fac..dc014d8f1e 100644
--- a/packages/www/hooks/use-api/endpoints/user.ts
+++ b/packages/www/hooks/use-api/endpoints/user.ts
@@ -48,7 +48,7 @@ export const login = async (email, password) => {
if (process.env.NODE_ENV === "production") {
const data = jwt.decode(token, { json: true });
- window.analytics.identify(data.sub, { email });
+ window.analytics && window.analytics.identify(data.sub, { email });
}
setState((state) => ({ ...state, token, refreshToken }));
@@ -117,7 +117,7 @@ export const refreshAccessToken = () =>
if (process.env.NODE_ENV === "production") {
const data = jwt.decode(token, { json: true });
- window.analytics.identify(data.sub, { email });
+ window.analytics && window.analytics.identify(data.sub, { email });
}
setState((state) => ({ ...state, token, refreshToken }));
diff --git a/packages/www/hooks/use-api/index.tsx b/packages/www/hooks/use-api/index.tsx
index c3e861da5e..0c9e67b41f 100644
--- a/packages/www/hooks/use-api/index.tsx
+++ b/packages/www/hooks/use-api/index.tsx
@@ -36,7 +36,10 @@ export const getEndpoint = () => {
if (isDevelopment()) {
return "http://localhost:3004";
}
- return "";
+ if (typeof document !== "undefined") {
+ return `${document.location.protocol}//${document.location.host}`;
+ }
+ return "https://livepeer.studio";
};
const endpoint = getEndpoint();
diff --git a/packages/www/layouts/admin.tsx b/packages/www/layouts/admin.tsx
index 2a4cd7bcd7..4a82c76a88 100644
--- a/packages/www/layouts/admin.tsx
+++ b/packages/www/layouts/admin.tsx
@@ -11,6 +11,7 @@ import Router from "next/router";
import { Reset, ThemeProvider } from "../lib/theme";
import Head from "next/head";
import { hotjar } from "react-hotjar";
+import { isExport } from "lib/utils";
interface Props {
title?: string;
@@ -34,7 +35,7 @@ if (process.env.NODE_ENV === "production") {
// Track client-side page views with Segment & HubSpot
if (process.env.NODE_ENV === "production") {
Router.events.on("routeChangeComplete", (url) => {
- window.analytics.page();
+ window.analytics && window.analytics.page();
var _hsq = (window["hsq"] = window["hsq"] || []);
_hsq.push(["setPath", url]);
_hsq.push(["trackPageView"]);
@@ -93,7 +94,7 @@ const Layout = ({
-
+ {!isExport() && }
{
- window.analytics.page();
+ window.analytics && window.analytics.page();
var _hsq = (window["hsq"] = window["hsq"] || []);
_hsq.push(["setPath", url]);
_hsq.push(["trackPageView"]);
@@ -62,7 +64,7 @@ function DashboardLayout({
const stripePromise = useMemo(() => getStripe(), []);
useEffect(() => {
- if (window.location.hostname === "livepeer.studio") {
+ if (isProduction()) {
ReactGA.pageview(window.location.pathname + window.location.search);
hotjar.initialize(2525106, 6);
}
@@ -98,7 +100,7 @@ function DashboardLayout({
-
+ {!isExport() && }
diff --git a/packages/www/layouts/main.tsx b/packages/www/layouts/main.tsx
index f0345d66b7..4aaed5854e 100644
--- a/packages/www/layouts/main.tsx
+++ b/packages/www/layouts/main.tsx
@@ -6,13 +6,7 @@ import { NextSeo } from "next-seo";
import { hotjar } from "react-hotjar";
import GoogleTagManager from "components/GoogleTagManager";
import Footer from "components/Footer";
-import Spinner from "components/Spinner";
-import { useLoggedIn } from "hooks";
-import Fade from "react-reveal/Fade";
-import { DefaultNav } from "components/Site/Navigation";
-import TopNotification, {
- TopNotificationProps,
-} from "components/Site/TopNotification";
+import { isExport } from "lib/utils";
if (process.env.NODE_ENV === "production") {
ReactGA.initialize(process.env.NEXT_PUBLIC_GA_TRACKING_ID);
@@ -23,7 +17,7 @@ if (process.env.NODE_ENV === "production") {
// Track client-side page views with Segment & HubSpot
if (process.env.NODE_ENV === "production") {
Router.events.on("routeChangeComplete", (url) => {
- window.analytics.page();
+ window.analytics && window.analytics.page();
var _hsq = (window["hsq"] = window["hsq"] || []);
_hsq.push(["setPath", url]);
_hsq.push(["trackPageView"]);
@@ -89,23 +83,9 @@ function Layout({
seo["canonical"] = canonical;
}
- const topNotification: TopNotificationProps = {
- title: (
-
- 💰 Switch to Livepeer Studio by October 13th for{" "}
- up to six months free 💰
-
- ),
- link: {
- label: "Learn more",
- href: "https://livepeer.typeform.com/to/shoMCvCl#lead_source=xxxxx&contact_owner=xxxxx",
- isExternal: true,
- },
- };
-
return (
<>
-
+ {!isExport() && }
)}
-
{children}
diff --git a/packages/www/lib/ripe.ts b/packages/www/lib/ripe.ts
index cde1b56877..2c13fce761 100644
--- a/packages/www/lib/ripe.ts
+++ b/packages/www/lib/ripe.ts
@@ -1,3 +1,5 @@
+import { isExport } from "./utils";
+
export const categories = {
AUTH: "Authentication",
HOME: "Home",
@@ -50,9 +52,21 @@ declare global {
}
}
+const shouldRipe = () => {
+ if (typeof window === "undefined") {
+ return false;
+ }
+ if (isExport()) {
+ return false;
+ }
+ return true;
+};
+
const Ripe = {
identifyUser: (userId?: string, traits?: UserTraits): void => {
- if (typeof window === "undefined") return;
+ if (!shouldRipe()) {
+ return;
+ }
if (window.Ripe) {
window.Ripe.identify({
@@ -65,7 +79,9 @@ const Ripe = {
},
trackPage: (pageObject: PageObject): void => {
- if (typeof window === "undefined") return;
+ if (!shouldRipe()) {
+ return;
+ }
if (window.Ripe) {
window.Ripe.page(pageObject);
@@ -75,7 +91,9 @@ const Ripe = {
},
track: (eventObject: EventObject): void => {
- if (typeof window === "undefined") return;
+ if (!shouldRipe()) {
+ return;
+ }
if (window.Ripe) {
window.Ripe.track(eventObject);
diff --git a/packages/www/lib/utils/index.tsx b/packages/www/lib/utils/index.tsx
index 1aeee2f082..ec80ed8db5 100644
--- a/packages/www/lib/utils/index.tsx
+++ b/packages/www/lib/utils/index.tsx
@@ -1,27 +1,5 @@
-import { Stripe, loadStripe } from "@stripe/stripe-js";
+import { Stripe } from "@stripe/stripe-js/types/stripe-js";
import { theme } from "../theme";
-import { pascalCase } from "pascal-case";
-import { Element } from "react-scroll";
-
-export const getComponent = (component) => {
- const componentName = pascalCase(component._type);
-
- try {
- const Component = require(`components/Site/${componentName}`).default;
-
- return (
-
-
-
- );
- } catch (e) {
- return <>>;
- }
-};
export function pathJoin2(p1: string, p2: string): string {
if (!p1) {
@@ -98,11 +76,15 @@ export function blocksToText(blocks, opts = {}) {
* This is a singleton to ensure we only instantiate Stripe once.
*/
let stripePromise: Promise;
-export const getStripe = () => {
+export const getStripe = async () => {
+ if (isExport()) {
+ return Promise.resolve(null);
+ }
const key = process.env.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY;
if (!key) {
return Promise.resolve(null);
}
+ const { loadStripe } = await import("@stripe/stripe-js");
if (!stripePromise) {
stripePromise = loadStripe(process.env.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY);
}
@@ -113,6 +95,9 @@ export const getStripe = () => {
* should stripe be enabled in this context?
*/
export const shouldStripe = () => {
+ if (isExport()) {
+ return false;
+ }
if (!process.env.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY) {
return false;
}
@@ -235,6 +220,10 @@ export const CARD_OPTIONS = {
},
};
+export function isExport(): boolean {
+ return process.env.NEXT_PUBLIC_EXPORT === "true";
+}
+
export function isStaging(): boolean {
return (
typeof window !== "undefined" &&
@@ -245,6 +234,13 @@ export function isStaging(): boolean {
);
}
+export function isProduction(): boolean {
+ return (
+ typeof window !== "undefined" &&
+ window.location.hostname.includes("livepeer.studio")
+ );
+}
+
export function isDevelopment(): boolean {
return process.env.NODE_ENV === "development";
}
@@ -252,3 +248,13 @@ export function isDevelopment(): boolean {
export function truncate(str, n) {
return str.length > n ? str.substr(0, n - 1) + "…" : str;
}
+
+export function getBrandName(): string {
+ if (process.env.NEXT_PUBLIC_BRAND_NAME) {
+ return process.env.NEXT_PUBLIC_BRAND_NAME;
+ }
+ if (isExport()) {
+ return "Livepeer Catalyst";
+ }
+ return "Livepeer Studio";
+}
diff --git a/packages/www/next-seo.config.js b/packages/www/next-seo.config.js
index 064bd951c7..20fde2389b 100644
--- a/packages/www/next-seo.config.js
+++ b/packages/www/next-seo.config.js
@@ -1,5 +1,5 @@
export default {
- title: "Livepeer Studio",
+ title: "Livepeer Catalyst",
description:
"Livepeer Studio is a high-performance video streaming platform that enables developers to build unique live and on-demand video experiences with up to 90% cost savings.",
openGraph: {
diff --git a/packages/www/next.config.js b/packages/www/next.config.js
index 0b4152ef4b..14fe939ace 100644
--- a/packages/www/next.config.js
+++ b/packages/www/next.config.js
@@ -30,170 +30,176 @@ let config = {
unoptimized: true,
domains: ["cdn.sanity.io", "picsum.photos"],
},
- async redirects() {
- return [
- {
- source: "/docs",
- destination: "https://docs.livepeer.studio",
- permanent: false,
- },
- {
- source: "/docs/api",
- destination: "https://docs.livepeer.studio/category/api",
- permanent: false,
- },
- {
- source: "/app/user",
- destination: "/dashboard",
- permanent: false,
- },
- {
- source: "/app/user/keys",
- destination: "/dashboard/developers/api-keys",
- permanent: false,
- },
- {
- source: "/app/user/billing",
- destination: "/dashboard/billing",
- permanent: false,
- },
- {
- source: "/app/user/plans",
- destination: "/dashboard/billing/plans",
- permanent: false,
- },
- {
- source: "/app/test-player",
- destination: "/dashboard/stream-health",
- permanent: false,
- },
- {
- source: "/dashboard/plans",
- destination: "/dashboard/billing/plans",
- permanent: false,
- },
- {
- source: "/app/user/usage",
- destination: "/dashboard/usage",
- permanent: false,
- },
- {
- source: "/dashboard/billing/usage",
- destination: "/dashboard/usage",
- permanent: false,
- },
- {
- source: "/jobs/technical-writer",
- destination: "/jobs/1496366",
- permanent: false,
- },
- {
- source: "/jobs/full-stack-video-engineer",
- destination: "/jobs/1412799",
- permanent: false,
- },
- {
- source: "/jobs/operations-manager",
- destination: "/jobs/1466566",
- permanent: false,
- },
- {
- source: "/jobs/video-developer-community-manager",
- destination: "/jobs/1476601",
- permanent: false,
- },
- {
- source: "/jobs/web3-developer-evangelist",
- destination: "/jobs/1491881",
- permanent: false,
- },
- {
- source: "/jobs/chief-operating-officer",
- destination: "/jobs/1466562",
- permanent: false,
- },
- {
- source: "/jobs/senior-video-infrastructure-engineer",
- destination: "/jobs/1414584",
- permanent: false,
- },
- {
- source: "/jobs/video-developer-success-manager",
- destination: "/jobs/1476607",
- permanent: false,
- },
- {
- source: "/jobs/senior-software-engineer-video-transcoding",
- destination: "/jobs/1412803",
- permanent: false,
- },
- {
- source: "/jobs/analytics-engineer",
- destination: "/jobs/1496262",
- permanent: false,
- },
- {
- source: "/jobs/protocol-engineer",
- destination: "/jobs/1412804",
- permanent: false,
- },
- {
- source: "/jobs/investor-relations-manager",
- destination: "/jobs/1454503",
- permanent: false,
- },
- {
- source: "/jobs/senior-product-marketing-manager",
- destination: "/jobs/1454194",
- permanent: false,
- },
- {
- source: "/jobs/senior-lead-product-manager",
- destination: "/jobs/1454194",
- permanent: false,
- },
- {
- source: "/jobs/content-marketing",
- destination: "/jobs/1476609",
- permanent: false,
- },
- {
- source: "/jobs/marketing-manager",
- destination: "/jobs/1412808",
- permanent: false,
- },
- {
- source: "/jobs/events-manager",
- destination: "/jobs/1454453",
- permanent: false,
- },
- {
- source: "/jobs/engineering-manager-livepeer-core-software",
- destination: "/jobs/1478605",
- permanent: false,
- },
- {
- source: "/jobs/technical-product-manager-orchestrator-experience",
- destination: "/jobs/1496214",
- permanent: false,
- },
- {
- source: "/team",
- destination:
- "https://livepeer.notion.site/livepeer/Livepeer-Inc-6898d5451e2b40e79b1225812f4f1705",
- permanent: false,
- },
- ];
- },
};
-if (!isStaticBuild) {
+if (isStaticBuild) {
+ config = {
+ ...config,
+ output: "standalone",
+ distDir: "static-build-app",
+ };
+} else {
config = {
...config,
i18n: {
locales: ["en", "es"],
defaultLocale: "en",
},
+ async redirects() {
+ return [
+ {
+ source: "/docs",
+ destination: "https://docs.livepeer.studio",
+ permanent: false,
+ },
+ {
+ source: "/docs/api",
+ destination: "https://docs.livepeer.studio/category/api",
+ permanent: false,
+ },
+ {
+ source: "/app/user",
+ destination: "/dashboard",
+ permanent: false,
+ },
+ {
+ source: "/app/user/keys",
+ destination: "/dashboard/developers/api-keys",
+ permanent: false,
+ },
+ {
+ source: "/app/user/billing",
+ destination: "/dashboard/billing",
+ permanent: false,
+ },
+ {
+ source: "/app/user/plans",
+ destination: "/dashboard/billing/plans",
+ permanent: false,
+ },
+ {
+ source: "/app/test-player",
+ destination: "/dashboard/stream-health",
+ permanent: false,
+ },
+ {
+ source: "/dashboard/plans",
+ destination: "/dashboard/billing/plans",
+ permanent: false,
+ },
+ {
+ source: "/app/user/usage",
+ destination: "/dashboard/usage",
+ permanent: false,
+ },
+ {
+ source: "/dashboard/billing/usage",
+ destination: "/dashboard/usage",
+ permanent: false,
+ },
+ {
+ source: "/jobs/technical-writer",
+ destination: "/jobs/1496366",
+ permanent: false,
+ },
+ {
+ source: "/jobs/full-stack-video-engineer",
+ destination: "/jobs/1412799",
+ permanent: false,
+ },
+ {
+ source: "/jobs/operations-manager",
+ destination: "/jobs/1466566",
+ permanent: false,
+ },
+ {
+ source: "/jobs/video-developer-community-manager",
+ destination: "/jobs/1476601",
+ permanent: false,
+ },
+ {
+ source: "/jobs/web3-developer-evangelist",
+ destination: "/jobs/1491881",
+ permanent: false,
+ },
+ {
+ source: "/jobs/chief-operating-officer",
+ destination: "/jobs/1466562",
+ permanent: false,
+ },
+ {
+ source: "/jobs/senior-video-infrastructure-engineer",
+ destination: "/jobs/1414584",
+ permanent: false,
+ },
+ {
+ source: "/jobs/video-developer-success-manager",
+ destination: "/jobs/1476607",
+ permanent: false,
+ },
+ {
+ source: "/jobs/senior-software-engineer-video-transcoding",
+ destination: "/jobs/1412803",
+ permanent: false,
+ },
+ {
+ source: "/jobs/analytics-engineer",
+ destination: "/jobs/1496262",
+ permanent: false,
+ },
+ {
+ source: "/jobs/protocol-engineer",
+ destination: "/jobs/1412804",
+ permanent: false,
+ },
+ {
+ source: "/jobs/investor-relations-manager",
+ destination: "/jobs/1454503",
+ permanent: false,
+ },
+ {
+ source: "/jobs/senior-product-marketing-manager",
+ destination: "/jobs/1454194",
+ permanent: false,
+ },
+ {
+ source: "/jobs/senior-lead-product-manager",
+ destination: "/jobs/1454194",
+ permanent: false,
+ },
+ {
+ source: "/jobs/content-marketing",
+ destination: "/jobs/1476609",
+ permanent: false,
+ },
+ {
+ source: "/jobs/marketing-manager",
+ destination: "/jobs/1412808",
+ permanent: false,
+ },
+ {
+ source: "/jobs/events-manager",
+ destination: "/jobs/1454453",
+ permanent: false,
+ },
+ {
+ source: "/jobs/engineering-manager-livepeer-core-software",
+ destination: "/jobs/1478605",
+ permanent: false,
+ },
+ {
+ source: "/jobs/technical-product-manager-orchestrator-experience",
+ destination: "/jobs/1496214",
+ permanent: false,
+ },
+ {
+ source: "/team",
+ destination:
+ "https://livepeer.notion.site/livepeer/Livepeer-Inc-6898d5451e2b40e79b1225812f4f1705",
+ permanent: false,
+ },
+ ];
+ },
};
}
diff --git a/packages/www/package.json b/packages/www/package.json
index 8ebbf6beae..935507bbc4 100644
--- a/packages/www/package.json
+++ b/packages/www/package.json
@@ -7,7 +7,7 @@
"dev": "next",
"dev:staging": "NEXT_PUBLIC_USE_STAGING_ENDPOINT=true yarn dev",
"build": "next build",
- "static": "STATIC_BUILD=true next build && STATIC_BUILD=true next export",
+ "static": "STATIC_BUILD=true NEXT_PUBLIC_EXPORT=true next build && STATIC_BUILD=true NEXT_PUBLIC_EXPORT=true next export -o static-build",
"start": "next start -p 3012",
"postbuild": "next-sitemap",
"type-check": "tsc --pretty --noEmit",
@@ -163,23 +163,5 @@
"git add"
]
},
- "bin": "server.js",
- "pkg": {
- "assets": [
- ".next/**/*",
- "../../node_modules/dom-helpers/**/*",
- "../../node_modules/react-icons/**/*",
- "../../node_modules/next-mdx-remote/**/*"
- ],
- "scripts": [
- ".next/dist/**/*.js"
- ],
- "targets": [
- "node18-macos-arm64",
- "node18-macos-x64",
- "node18-linux-arm64",
- "node18-linux-x64",
- "node18-windows-x64"
- ]
- }
+ "bin": "server.js"
}
diff --git a/packages/www/pages/[slug].tsx b/packages/www/pages/[slug].tsx
deleted file mode 100644
index e410f0c3ec..0000000000
--- a/packages/www/pages/[slug].tsx
+++ /dev/null
@@ -1,112 +0,0 @@
-import Fade from "react-reveal/Fade";
-import Layout from "layouts/main";
-import imageUrlBuilder from "@sanity/image-url";
-import { getComponent } from "lib/utils";
-import { useRouter } from "next/router";
-import { Text, Box, Container } from "@livepeer/design-system";
-import { client } from "lib/client";
-
-const Page = ({
- title,
- metaTitle,
- metaDescription,
- metaUrl,
- openGraphImage,
- content,
- noindex = false,
- preview,
-}) => {
- const router = useRouter();
- const builder = imageUrlBuilder(client as any);
- if (router.isFallback) {
- return (
-
-
- Loading...
-
-
- );
- }
-
- if (!content || !title) {
- return (
-
-
- Error
-
-
- );
- }
-
- return (
-
-
- {content.map((component, i) => (
-
- {getComponent(component)}
-
- ))}
-
-
- );
-};
-
-export async function getStaticPaths() {
- const queryForPaths = `*[_type in ["page", "solution"] && defined(slug.current)][].slug.current`;
- const data: string[] = (await client.fetch(queryForPaths)) ?? [];
- const paths = data
- .filter((path) => path !== "jobs" && path !== "team")
- .map((path) => ({ params: { slug: path } }));
- return {
- fallback: true,
- paths,
- };
-}
-
-export async function getStaticProps({ params, locale }) {
- const { slug } = params;
- const queryParams = {
- slug,
- };
-
- const query = `*[_type in ["page", "solution"] && slug.current == $slug][0]`;
- const pageData = (await client.fetch(query, queryParams)) ?? {};
-
- return {
- props: {
- ...pageData,
- },
- revalidate: 5,
- };
-}
-
-Page.theme = "light-theme-green";
-export default Page;
diff --git a/packages/www/pages/_app.tsx b/packages/www/pages/_app.tsx
index 2dc38535a2..9e5e2ec634 100644
--- a/packages/www/pages/_app.tsx
+++ b/packages/www/pages/_app.tsx
@@ -11,8 +11,8 @@ import {
studioProvider,
} from "@livepeer/react";
import { AnalyzerProvider } from "hooks/use-analyzer";
-import { ApiProvider } from "hooks/use-api";
-import { isDevelopment, isStaging } from "lib/utils";
+import { ApiProvider, getEndpoint } from "hooks/use-api";
+import { getBrandName, isDevelopment, isExport, isStaging } from "lib/utils";
import { MetaMaskProvider } from "metamask-react";
import { DefaultSeo } from "next-seo";
import { ThemeProvider } from "next-themes";
@@ -65,25 +65,6 @@ Object.keys(themes).map(
(key, _index) => (themeMap[themes[key].className] = themes[key].className)
);
-// Allow for manual overriding of the API server endopint
-const getEndpoint = () => {
- try {
- const override = localStorage.getItem("LP_API_SERVER_OVERRIDE");
- if (typeof override === "string") {
- return override;
- }
- } catch (e) {
- // not found, no problem
- }
- if (process.env.NEXT_PUBLIC_USE_STAGING_ENDPOINT === "true" || isStaging()) {
- return "https://livepeer.monster";
- }
- if (isDevelopment()) {
- return "http://localhost:3004";
- }
- return "https://livepeer.studio";
-};
-
const livepeerClient = createReactClient({
provider: studioProvider({
// we intentionally provide no API key so any requests requiring auth will fail
@@ -120,7 +101,7 @@ const App = ({ Component, pageProps }) => {
globalStyles();
return (
<>
- Livepeer Studio
+ {getBrandName()}
@@ -145,9 +126,11 @@ const App = ({ Component, pageProps }) => {
client={livepeerClient}>
-
+ {!isExport() && (
+
+ )}
diff --git a/packages/www/pages/_document.tsx b/packages/www/pages/_document.tsx
index 09bdf5e5a8..d86296894d 100644
--- a/packages/www/pages/_document.tsx
+++ b/packages/www/pages/_document.tsx
@@ -1,6 +1,7 @@
import Document, { Html, Head, Main, NextScript } from "next/document";
import { min as snippetMin } from "@segment/snippet";
import { getCssText } from "@livepeer/design-system";
+import { isExport } from "lib/utils";
const MyDocument = () => {
const renderSnippet = () => {
@@ -193,14 +194,14 @@ const MyDocument = () => {
}}
/>
{/* Inject the Segment snippet into the of the document */}
- {process.env.NODE_ENV === "production" && (
+ {process.env.NODE_ENV === "production" && !isExport() && (
)}
- {
+ {!isExport() && (