File tree Expand file tree Collapse file tree
components/GitHubInstallButtons Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 GITHUB_MAIN_REPO_SLUG ,
66 GITHUB_MAIN_REPO_URL ,
77 VSCODE_MARKETPLACE_EXTENSION_ID ,
8- VSCODE_MARKETPLACE_INSTALLS_FALLBACK ,
98 VSCODE_MARKETPLACE_URL ,
109} from '@site/src/constants' ;
1110import styles from './styles.module.css' ;
@@ -90,7 +89,7 @@ async function getVSCodeDownloads() {
9089
9190export default function GitHubInstallButtons ( ) : React . JSX . Element {
9291 const [ stars , setStars ] = useState < string | null > ( null ) ;
93- const [ downloads , setDownloads ] = useState < string | null > ( formatNumber ( VSCODE_MARKETPLACE_INSTALLS_FALLBACK ) ) ;
92+ const [ downloads , setDownloads ] = useState < string | null > ( null ) ;
9493
9594 useEffect ( ( ) => {
9695 // Fetch live data
@@ -99,7 +98,7 @@ export default function GitHubInstallButtons(): React.JSX.Element {
9998 } ) ;
10099
101100 getVSCodeDownloads ( ) . then ( count => {
102- if ( count ) setDownloads ( formatNumber ( Math . max ( count , VSCODE_MARKETPLACE_INSTALLS_FALLBACK ) ) ) ;
101+ if ( count ) setDownloads ( formatNumber ( count ) ) ;
103102 } ) ;
104103 } , [ ] ) ;
105104
@@ -133,4 +132,4 @@ export default function GitHubInstallButtons(): React.JSX.Element {
133132 </ a >
134133 </ div >
135134 ) ;
136- }
135+ }
Original file line number Diff line number Diff line change @@ -22,7 +22,6 @@ export const GITHUB_FEATURES_URL = `${GITHUB_MAIN_REPO_URL}/discussions/categori
2222
2323// Download links
2424export const VSCODE_MARKETPLACE_EXTENSION_ID = 'ZooCodeOrganization.zoo-code' ;
25- export const VSCODE_MARKETPLACE_INSTALLS_FALLBACK = 1814 ;
2625export const VSCODE_MARKETPLACE_URL = 'https://marketplace.visualstudio.com/items?itemName=ZooCodeOrganization.zoo-code' ;
2726export const OPEN_VSX_URL = 'https://open-vsx.org/extension/ZooCodeOrganization.zoo-code' ;
2827
You can’t perform that action at this time.
0 commit comments