diff --git a/knip.jsonc b/knip.jsonc index 9b24f0888..18697d46e 100644 --- a/knip.jsonc +++ b/knip.jsonc @@ -54,7 +54,6 @@ "src/components/QueryGGBanner.tsx", "src/components/SponsorsSection.tsx", "src/components/StackBlitzEmbed.tsx", - "src/components/StackBlitzSection.tsx", "src/components/Style.tsx", "src/components/TocMobile.tsx", "src/components/UserFeedbackSection.tsx", diff --git a/src/components/StackBlitzSection.tsx b/src/components/StackBlitzSection.tsx deleted file mode 100644 index 15dbea1f1..000000000 --- a/src/components/StackBlitzSection.tsx +++ /dev/null @@ -1,49 +0,0 @@ -import { useState } from 'react' -import { StackBlitzEmbed } from '~/components/StackBlitzEmbed' -import { FrameworkIconTabs } from '~/components/FrameworkIconTabs' -import type { Framework, Library } from '~/libraries' - -interface StackBlitzSectionProps { - project: Library - branch: string - examplePath: string | ((framework: Framework) => string) - title?: string | ((framework: Framework) => string) -} - -export function StackBlitzSection({ - project, - branch, - examplePath, - title, -}: StackBlitzSectionProps) { - const [framework, setFramework] = useState(project.frameworks[0]) - - const resolvedPath = - typeof examplePath === 'function' - ? examplePath(framework) - : examplePath.replace('${framework}', framework) - - const resolvedTitle = - typeof title === 'function' - ? title(framework) - : (title?.replace('${framework}', framework) ?? - `tannerlinsley/${framework}-${project.id}: basic`) - - return ( -
-
- - -
-
- ) -}