🎥 Make videos programmatically with React
fixing things
evoxf1ff5f32272522
diff --git a/packages/docs/src/components/Credits.tsx b/packages/docs/src/components/Credits.tsxindex c002d43549..edea58eaf6 100644--- a/packages/docs/src/components/Credits.tsx+++ b/packages/docs/src/components/Credits.tsx@@ -1,77 +1,5 @@import React from "react";--const contributors = [- {- id: 1,- name: "Sahil Bhardwaj",- username: "evoxf1",- avatarUrl: "https://github.com/evoxf1.png",- contributionType: "creitsad pasfojafpsn asnfansfoasnf asfn akjsfn ",- },- {- id: 2,- name: "Jonny Burger",- username: "jonnyburger",- avatarUrl: "https://github.com/jonnyburger.png",- contributionType: "creitsad pasfojafpsn asnfansfoasnf asfn akjsfn ",- },- {- id: 1,- name: "Sahil Bhardwaj",- username: "evoxf1",- avatarUrl: "https://github.com/evoxf1.png",- contributionType: "creitsad pasfojafpsn asnfansfoasnf asfn akjsfn ",- },- {- id: 2,- name: "Jonny Burger",- username: "jonnyburger",- avatarUrl: "https://github.com/jonnyburger.png",- contributionType: "creitsad pasfojafpsn asnfansfoasnf asfn akjsfn ",- },- {- id: 1,- name: "Sahil Bhardwaj",- username: "evoxf1",- avatarUrl: "https://github.com/evoxf1.png",- contributionType: "creitsad pasfojafpsn asnfansfoasnf asfn akjsfn ",- },- {- id: 2,- name: "Jonny Burger",- username: "jonnyburger",- avatarUrl: "https://github.com/jonnyburger.png",- contributionType: "creitsad pasfojafpsn asnfansfoasnf asfn akjsfn ",- },- {- id: 1,- name: "Sahil Bhardwaj",- username: "evoxf1",- avatarUrl: "https://github.com/evoxf1.png",- contributionType: "creitsad pasfojafpsn asnfansfoasnf asfn akjsfn ",- },- {- id: 2,- name: "Jonny Burger",- username: "jonnyburger",- avatarUrl: "https://github.com/jonnyburger.png",- contributionType: "creitsad pasfojafpsn asnfansfoasnf asfn akjsfn ",- },- {- id: 1,- name: "Sahil Bhardwaj",- username: "evoxf1",- avatarUrl: "https://github.com/evoxf1.png",- contributionType: "creitsad pasfojafpsn asnfansfoasnf asfn akjsfn ",- },- {- id: 2,- name: "Jonny Burger",- username: "jonnyburger",- avatarUrl: "https://github.com/jonnyburger.png",- contributionType: "creitsad pasfojafpsn asnfansfoasnf asfn akjsfn ",- },-];+import contributorsData from "../data/contributorsData";const containerStyle: React.CSSProperties = {margin: "20px 0",@@ -119,30 +47,32 @@ const labelStyle: React.CSSProperties = {marginTop: "10px",};+const ContributorCard = ({ name, username, avatarUrl, contributionType }) => {+ return (+ <div style={cardStyle}>+ <img src={avatarUrl} alt={username} style={avatarStyle} />+ <div style={infoStyle}>+ <a+ href={`https://github.com/${username}`}+ target="_blank"+ rel="noopener noreferrer"+ style={linkStyle}+ >+ <strong>{name}</strong>+ </a>+ <p style={labelStyle}>{contributionType}</p>+ </div>+ </div>+ );+};+const Credits = () => {return (<div style={containerStyle}><h3 style={{ fontSize: "2em", marginBottom: "20px" }}>Credits</h3><div style={cardContainerStyle}>- {contributors.map((contributor) => (- <div key={contributor.id} style={cardStyle}>- <img- src={contributor.avatarUrl}- alt={contributor.username}- style={avatarStyle}- />- <div style={infoStyle}>- <a- href={`https://github.com/${contributor.username}`}- target="_blank"- rel="noopener noreferrer"- style={linkStyle}- >- <strong>{contributor.name}</strong>- </a>- <p style={labelStyle}>{contributor.contributionType}</p>- </div>- </div>+ {contributorsData.map((contributor) => (+ <ContributorCard key={contributor.id} {...contributor} />))}</div></div>diff --git a/packages/docs/src/data/contributorsData.ts b/packages/docs/src/data/contributorsData.tsnew file mode 100644index 0000000000..3d74c9114f--- /dev/null+++ b/packages/docs/src/data/contributorsData.ts@@ -0,0 +1,21 @@+// contributorsData.ts+interface Contributor {+ id: number;+ name: string;+ username: string;+ avatarUrl: string;+ contributionType: string;+}++const contributorsData: Contributor[] = [+ {+ id: 1,+ name: "Sahil Bhardwaj",+ username: "evoxf1",+ avatarUrl: "https://github.com/evoxf1.png",+ contributionType: "Contribution of passing FFmpeg filter to change the pitch of the audio",+ },+ // Add more contributors here+];++export default contributorsData;diff --git a/packages/docs/src/theme/MDXComponents.js b/packages/docs/src/theme/MDXComponents.jsindex d930f4525c..f9ff5d8632 100644--- a/packages/docs/src/theme/MDXComponents.js+++ b/packages/docs/src/theme/MDXComponents.js@@ -4,8 +4,8 @@ import { Demo } from "../../components/demos";import { ExperimentalBadge } from "../../components/Experimental";import { InlineStep, Step } from "../../components/InlineStep";import { AvailableFrom } from "../components/AvailableFrom";+import { Credits } from "../components/Credits";import { Options } from "../components/Options";-import { Credits } from '../components/Credits'export default {...MDXComponents,@@ -15,5 +15,5 @@ export default {Demo,AvailableFrom,Options,- Credits+ Credits: () => <Credits contributors={ContributorsData} />,};