From 3a42eef0c172015ea400344e3d2ee55e4647bf3f Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Sun, 28 Jan 2024 13:22:57 +1100 Subject: [PATCH] Make docs render --- app/projects/config.ts | 12 ++++++++++++ app/routes/config.$version.docs.tsx | 2 ++ 2 files changed, 14 insertions(+) diff --git a/app/projects/config.ts b/app/projects/config.ts index 1c097011..b58eb16c 100644 --- a/app/projects/config.ts +++ b/app/projects/config.ts @@ -1,3 +1,7 @@ +import reactLogo from '~/images/react-logo.svg' +import solidLogo from '~/images/solid-logo.svg' +import vueLogo from '~/images/vue-logo.svg' + export const repo = 'tanstack/config' export const latestBranch = 'main' @@ -8,6 +12,14 @@ export const colorFrom = 'from-gray-500' export const colorTo = 'to-gray-700' export const textColor = 'text-gray-700' +export const frameworks = { + react: { label: 'React', logo: reactLogo, value: 'react' }, + solid: { label: 'Solid', logo: solidLogo, value: 'solid' }, + vue: { label: 'Vue', logo: vueLogo, value: 'vue' }, +} as const + +export type Framework = keyof typeof frameworks + export function getBranch(argVersion?: string) { const version = argVersion || latestVersion diff --git a/app/routes/config.$version.docs.tsx b/app/routes/config.$version.docs.tsx index d4c65953..4395e7fe 100644 --- a/app/routes/config.$version.docs.tsx +++ b/app/routes/config.$version.docs.tsx @@ -10,6 +10,7 @@ import { repo, textColor, availableVersions, + frameworks, } from '~/projects/config' import { getTanstackDocsConfig } from '~/utils/config' @@ -36,6 +37,7 @@ export default function Component() { colorTo={colorTo} textColor={textColor} config={config} + frameworks={frameworks} availableVersions={availableVersions} repo={repo} >