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