mirror of
https://github.com/rohitg00/skillkit.git
synced 2026-11-19 02:13:58 +00:00
Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e392643c99 | ||
|
|
56b5fa246e | ||
|
|
bf0f3e1917 | ||
|
|
822bd6f753 |
@@ -123,7 +123,7 @@ export default function App(): React.ReactElement {
|
||||
<svg className="w-3.5 h-3.5 text-zinc-500 group-hover:text-yellow-500 transition-colors" fill="currentColor" viewBox="0 0 24 24">
|
||||
<path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z" />
|
||||
</svg>
|
||||
<span className="text-xs font-mono text-zinc-400 group-hover:text-white transition-colors">{stats.stars || '—'}</span>
|
||||
<span className="text-xs font-mono text-zinc-400 group-hover:text-white transition-colors">{stats.stars}</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -131,7 +131,7 @@ export default function App(): React.ReactElement {
|
||||
</nav>
|
||||
|
||||
<main className="pt-14">
|
||||
<Hero version={stats.version || '—'} stars={stats.stars || '—'} />
|
||||
<Hero version={stats.version} stars={stats.stars} />
|
||||
|
||||
<div className="border-b border-zinc-800/50 py-2.5" style={{ background: 'linear-gradient(to bottom, rgba(9,9,11,0.95), rgba(0,0,0,1))' }}>
|
||||
<div className="mx-auto max-w-5xl px-4 sm:px-6 lg:px-8">
|
||||
@@ -143,7 +143,7 @@ export default function App(): React.ReactElement {
|
||||
className="flex items-center gap-1.5 text-zinc-500 hover:text-white transition-colors group"
|
||||
>
|
||||
<span className="text-zinc-600 group-hover:text-zinc-400">v</span>
|
||||
<span className="text-white font-medium">{stats.version || '—'}</span>
|
||||
<span className="text-white font-medium">{stats.version}</span>
|
||||
</a>
|
||||
<span className="text-zinc-800">·</span>
|
||||
<a
|
||||
@@ -155,7 +155,7 @@ export default function App(): React.ReactElement {
|
||||
<svg className="w-3 h-3 text-zinc-600 group-hover:text-zinc-400" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4" />
|
||||
</svg>
|
||||
<span className="text-white font-medium">{stats.downloads || '—'}</span>
|
||||
<span className="text-white font-medium">{stats.downloads}</span>
|
||||
</a>
|
||||
<span className="text-zinc-800">·</span>
|
||||
<a
|
||||
@@ -167,7 +167,7 @@ export default function App(): React.ReactElement {
|
||||
<svg className="w-3 h-3 text-zinc-600 group-hover:text-yellow-500" fill="currentColor" viewBox="0 0 24 24">
|
||||
<path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z" />
|
||||
</svg>
|
||||
<span className="text-white font-medium">{stats.stars || '—'}</span>
|
||||
<span className="text-white font-medium">{stats.stars}</span>
|
||||
</a>
|
||||
<span className="text-zinc-800 hidden sm:inline">·</span>
|
||||
<a
|
||||
|
||||
@@ -169,7 +169,7 @@ export function Hero({ version, stars }: HeroProps): React.ReactElement {
|
||||
<path fillRule="evenodd" d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z" clipRule="evenodd" />
|
||||
</svg>
|
||||
<span className="font-mono text-sm text-zinc-300 group-hover:text-white transition-colors">Star</span>
|
||||
{typeof stars === 'number' && stars > 0 && (
|
||||
{typeof stars === 'number' && (
|
||||
<>
|
||||
<span className="w-px h-4 bg-zinc-700"></span>
|
||||
<svg className="w-3.5 h-3.5 text-yellow-500" fill="currentColor" viewBox="0 0 24 24">
|
||||
|
||||
@@ -54,9 +54,9 @@ function setCachedStats(data: Omit<Stats, 'loading'>): void {
|
||||
|
||||
export function useStats(): Stats {
|
||||
const [stats, setStats] = useState<Stats>({
|
||||
version: '',
|
||||
downloads: '',
|
||||
stars: 0,
|
||||
version: '1.9.0',
|
||||
downloads: '2.4k',
|
||||
stars: 66,
|
||||
loading: true,
|
||||
});
|
||||
|
||||
@@ -74,9 +74,9 @@ export function useStats(): Stats {
|
||||
fetch('https://api.github.com/repos/rohitg00/skillkit'),
|
||||
]);
|
||||
|
||||
let downloads = '';
|
||||
let stars = 0;
|
||||
let version = '';
|
||||
let downloads = '2.4k';
|
||||
let stars = 66;
|
||||
let version = '1.9.0';
|
||||
|
||||
if (npmResponse.status === 'fulfilled' && npmResponse.value.ok) {
|
||||
const npmData = await npmResponse.value.json();
|
||||
|
||||
Reference in New Issue
Block a user