Skip to content

Commit c76ac59

Browse files
committed
docs: move alpha to main branch
1 parent 8f2d121 commit c76ac59

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

docs/app/page.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,6 @@ export default function Home() {
126126
"";
127127

128128
const exampleUrl = `https://github.com/get-convex/better-auth/tree/${branch || "latest"}/examples`;
129-
console.log("branch", branch);
130-
console.log("exampleUrl", exampleUrl);
131129
const selectedFramework = useSelectedVariant("framework");
132130
return (
133131
<div className="max-w-3xl mx-auto px-4 sm:px-6 md:mt-12">

docs/app/version-selector.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,29 @@ import { cn } from "../lib/utils";
66
import { useEffect, useRef } from "react";
77
import localVersions from "../versions.json";
88

9-
const channels = ["latest", "alpha"];
10-
119
const DOCS_DOMAIN = "convex-better-auth.netlify.app";
1210

1311
type Version = {
1412
label: string;
1513
version: string;
14+
branch: string;
1615
};
1716

1817
const getVersions = async () => {
1918
return (
2019
await Promise.all(
21-
channels.map(async (channel) => {
20+
localVersions.map(async (version) => {
2221
try {
2322
const versions: Version[] = await (
2423
await fetch(
25-
`https://raw.githubusercontent.com/get-convex/better-auth/refs/heads/${channel}/docs/versions.json`
24+
`https://raw.githubusercontent.com/get-convex/better-auth/refs/heads/${version.branch}/docs/versions.json`
2625
)
2726
).json();
2827
const isArray = Array.isArray(versions);
2928
if (!isArray) {
3029
throw Error("versions is not an array");
3130
}
32-
return versions.find((v) => v.label === channel);
31+
return versions.find((v) => v.label === version.label);
3332
} catch (error) {
3433
console.error(error);
3534
}

docs/versions.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
[
22
{
33
"version": "v0.7.14",
4-
"label": "latest"
4+
"label": "latest",
5+
"branch": "latest"
56
},
67
{
78
"version": "v0.8.0-alpha.5",
8-
"label": "alpha"
9+
"label": "alpha",
10+
"branch": "main"
911
}
1012
]

0 commit comments

Comments
 (0)