Update landing-hero-github-stars.tsx

This commit is contained in:
Stefan Pejcic 2024-09-25 15:47:13 +02:00 committed by GitHub
parent 3adbb63825
commit 7734aed900
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3,13 +3,13 @@ import clsx from 'clsx';
import { OrangeStarIcon } from './icons/orange-star';
export const LandingHeroGithubStars = () => {
const [version, setVersion] = useState('0.2'); // Default version
const [version, setVersion] = useState('0.3.0'); // Default version
useEffect(() => {
// Function to fetch version information
const fetchVersion = async () => {
try {
const response = await fetch('https://get.openpanel.co/version');
const response = await fetch('https://openpanel.org/version');
const data = await response.text();
setVersion(data.trim()); // Update the version state
} catch (error) {