Updated docs

This commit is contained in:
amithkoujalgi
2025-04-19 22:11:36 +05:30
parent 43361ff271
commit 4d03673d8c
14 changed files with 511 additions and 29 deletions

View File

@@ -1,6 +1,6 @@
import React, { useState, useEffect } from 'react';
const LatestRelease = () => {
const LatestRelease = ({ showReleaseDate }) => {
const [releaseInfo, setReleaseInfo] = useState(null);
const [loading, setLoading] = useState(true);
const [error, setError] = useState(null);
@@ -37,7 +37,8 @@ const LatestRelease = () => {
<div>
{/* <h4 style={{ display: 'flex', justifyContent: 'center'}}>Latest Release</h4> */}
<div>
<span style={{ fontWeight: 'bold'}}>Latest Version</span>: <a href={releaseInfo.html_url} target='_blank' rel="noopener noreferrer"><span style={{color: 'white', fontWeight: 'bold', backgroundColor:'#11bc11', borderRadius: '15px', padding: '5px'}}>{releaseInfo.name}</span></a> released on {new Date(releaseInfo.published_at).toLocaleDateString(undefined, { year: 'numeric', month: 'long', day: 'numeric' })}.
<span style={{ fontWeight: 'bold'}}>Latest Version</span>: <a href={releaseInfo.html_url} target='_blank' rel="noopener noreferrer"><span style={{color: 'white', fontWeight: 'bold', backgroundColor:'#11bc11', borderRadius: '15px', padding: '5px'}}>{releaseInfo.name}</span></a>
{showReleaseDate && ` released on ${new Date(releaseInfo.published_at).toLocaleDateString(undefined, { year: 'numeric', month: 'long', day: 'numeric' })}`}
</div>
{/* <pre style={{ whiteSpace: 'pre-wrap' }}>
{JSON.stringify(releaseInfo, null, 2)}