fix(stats): update github stars
This commit is contained in:
@@ -31,6 +31,7 @@ import {
|
||||
applyThemePreference,
|
||||
Footer,
|
||||
getGitHubStars,
|
||||
githubLink,
|
||||
Header,
|
||||
isThemePreference,
|
||||
themeStorageKey,
|
||||
@@ -240,7 +241,11 @@ export default function ModelCompareDetailPage(props: ModelCompareDetailPageProp
|
||||
<Meta name="twitter:description" content={description()} />
|
||||
<script type="application/ld+json">{structuredData()}</script>
|
||||
</Show>
|
||||
<Header githubStars={githubStars() ?? "150K"} links={compareHeaderLinks} brandHref={import.meta.env.BASE_URL} />
|
||||
<Header
|
||||
githubStars={githubStars() ?? githubLink.fallbackStars}
|
||||
links={compareHeaderLinks}
|
||||
brandHref={import.meta.env.BASE_URL}
|
||||
/>
|
||||
<div data-component="container">
|
||||
<div data-component="content">
|
||||
<ComparisonHero
|
||||
|
||||
@@ -32,6 +32,7 @@ import {
|
||||
applyThemePreference,
|
||||
Footer,
|
||||
getGitHubStars,
|
||||
githubLink,
|
||||
Header,
|
||||
isThemePreference,
|
||||
themeStorageKey,
|
||||
@@ -152,7 +153,11 @@ export default function StatsModel() {
|
||||
<Meta name="twitter:description" content={modelDescription()} />
|
||||
<Meta name="twitter:image" content={statsUnfurlUrl} />
|
||||
<Meta name="twitter:image:alt" content={i18n.t("app.unfurlAlt")} />
|
||||
<Header githubStars={githubStars() ?? "150K"} links={modelHeaderLinks()} brandHref={import.meta.env.BASE_URL} />
|
||||
<Header
|
||||
githubStars={githubStars() ?? githubLink.fallbackStars}
|
||||
links={modelHeaderLinks()}
|
||||
brandHref={import.meta.env.BASE_URL}
|
||||
/>
|
||||
<div data-component="container">
|
||||
<div data-component="content">
|
||||
<Show when={page() !== undefined} fallback={<ModelLoading />}>
|
||||
|
||||
@@ -32,6 +32,7 @@ import {
|
||||
applyThemePreference,
|
||||
Footer,
|
||||
getGitHubStars,
|
||||
githubLink,
|
||||
Header,
|
||||
isThemePreference,
|
||||
themeStorageKey,
|
||||
@@ -141,7 +142,11 @@ export default function StatsLab() {
|
||||
<Meta name="twitter:description" content={labDescription()} />
|
||||
<Meta name="twitter:image" content={statsUnfurlUrl} />
|
||||
<Meta name="twitter:image:alt" content={i18n.t("app.unfurlAlt")} />
|
||||
<Header githubStars={githubStars() ?? "150K"} links={labHeaderLinks()} brandHref={import.meta.env.BASE_URL} />
|
||||
<Header
|
||||
githubStars={githubStars() ?? githubLink.fallbackStars}
|
||||
links={labHeaderLinks()}
|
||||
brandHref={import.meta.env.BASE_URL}
|
||||
/>
|
||||
<div data-component="container">
|
||||
<div data-component="content">
|
||||
<Show when={page() !== undefined} fallback={<LabLoading />}>
|
||||
|
||||
@@ -20,6 +20,7 @@ import {
|
||||
applyThemePreference,
|
||||
Footer,
|
||||
getGitHubStars,
|
||||
githubLink,
|
||||
Header,
|
||||
isThemePreference,
|
||||
themeStorageKey,
|
||||
@@ -125,7 +126,11 @@ export default function ModelCompareIndex() {
|
||||
<Meta name="twitter:description" content={compareDescription} />
|
||||
<Meta name="twitter:image" content={statsUnfurlUrl} />
|
||||
<Meta name="twitter:image:alt" content={i18n.t("app.unfurlAlt")} />
|
||||
<Header githubStars={githubStars() ?? "150K"} links={compareHeaderLinks()} brandHref={import.meta.env.BASE_URL} />
|
||||
<Header
|
||||
githubStars={githubStars() ?? githubLink.fallbackStars}
|
||||
links={compareHeaderLinks()}
|
||||
brandHref={import.meta.env.BASE_URL}
|
||||
/>
|
||||
<div data-component="container">
|
||||
<div data-component="content">
|
||||
<section id="compare-tool" data-section="compare-home-hero">
|
||||
|
||||
@@ -10,7 +10,7 @@ export type HeaderLink = { href: string; label: string }
|
||||
export const githubLink = {
|
||||
href: "https://github.com/anomalyco/opencode",
|
||||
apiHref: "https://api.github.com/repos/anomalyco/opencode",
|
||||
fallbackStars: "150K",
|
||||
fallbackStars: "195K",
|
||||
}
|
||||
export const themePreferences = ["dark", "light", "system"] as const
|
||||
export const themeStorageKey = "opencode:stats-theme"
|
||||
@@ -18,7 +18,8 @@ export type ThemePreference = (typeof themePreferences)[number]
|
||||
|
||||
const compactNumberFormatter = new Intl.NumberFormat("en", {
|
||||
notation: "compact",
|
||||
maximumFractionDigits: 1,
|
||||
maximumFractionDigits: 0,
|
||||
roundingIncrement: 5,
|
||||
})
|
||||
|
||||
export const getGitHubStars = query(async () => {
|
||||
|
||||
Reference in New Issue
Block a user