chore: format code

This commit is contained in:
Ayo Ayco 2024-12-26 01:08:20 +01:00
parent 23af739ee4
commit 92fe3d8c0a
5 changed files with 21 additions and 21 deletions

View file

@ -1,4 +1,4 @@
import { defineConfig } from 'astro/config';
import { defineConfig } from 'astro/config'
// https://astro.build/config
export default defineConfig({});
export default defineConfig({})

View file

@ -1,5 +1,5 @@
---
import GithubStats from '../../../';
import GithubStats from '../../../'
---
<html lang="en">

View file

@ -1,3 +1,3 @@
{
"extends": "astro/tsconfigs/strictest"
}
}

View file

@ -1,3 +1,3 @@
import GithubStats from './src/GithubStats.astro';
export default GithubStats;
export * from './src/GithubStats.astro';
import GithubStats from './src/GithubStats.astro'
export default GithubStats
export * from './src/GithubStats.astro'

View file

@ -1,28 +1,28 @@
---
export interface Props {
username: string;
topLanguages?: boolean;
repo?: string;
showIcons?: boolean;
altText?: string;
username: string
topLanguages?: boolean
repo?: string
showIcons?: boolean
altText?: string
}
const { username, repo, topLanguages, showIcons, altText } = Astro.props;
const baseUrl = 'https://github-readme-stats.vercel.app/api/';
let url = `${baseUrl}?username=${username}&show_icons=${!!showIcons}`;
const { username, repo, topLanguages, showIcons, altText } = Astro.props
const baseUrl = 'https://github-readme-stats.vercel.app/api/'
let url = `${baseUrl}?username=${username}&show_icons=${!!showIcons}`
let alt = `GitHub stats for account: ${username}`;
let alt = `GitHub stats for account: ${username}`
if (repo) {
url = `${baseUrl}/pin/?username=${username}&repo=${repo}`;
alt = `GitHub stats for repository: ${username}/${repo}`;
url = `${baseUrl}/pin/?username=${username}&repo=${repo}`
alt = `GitHub stats for repository: ${username}/${repo}`
}
if (topLanguages) {
url = `${baseUrl}top-langs?username=${username}`;
alt = `GitHub top languages for account: ${username}`;
url = `${baseUrl}top-langs?username=${username}`
alt = `GitHub top languages for account: ${username}`
}
alt = altText || alt;
alt = altText || alt
---
<img src={url} alt={alt} />