Set types to fix for error-ing workflow

This commit is contained in:
Michał 2024-05-23 20:20:44 +01:00
parent ea35f507b1
commit 06199deff2
2 changed files with 8 additions and 7 deletions

View file

@ -15,10 +15,10 @@
const request = await fetch("https://lastfm-last-played.biancarosa.com.br/Fluffy_Bean_/latest-song");
const data = await request.json();
( <HTMLImageElement>document.querySelector("#music-image") ).src = data["track"]["image"][1]["#text"];
( <HTMLParagraphElement>document.querySelector("#music-title") ).innerText = `Listening to ${data["track"]["name"]}`;
( <HTMLParagraphElement>document.querySelector("#music-artist") ).innerText = `by ${data["track"]["artist"]["#text"]}`;
( <HTMLParagraphElement>document.querySelector("#music-album") ).innerText = `on ${data["track"]["album"]["#text"]}`;
( document.querySelector("#music-image") as HTMLImageElement ).src = data["track"]["image"][1]["#text"];
( document.querySelector("#music-title") as HTMLParagraphElement ).innerText = `Listening to ${data["track"]["name"]}`;
( document.querySelector("#music-artist") as HTMLParagraphElement ).innerText = `by ${data["track"]["artist"]["#text"]}`;
( document.querySelector("#music-album") as HTMLParagraphElement ).innerText = `on ${data["track"]["album"]["#text"]}`;
});
</script>

View file

@ -5,9 +5,10 @@ import Layout from "../layouts/Layout.astro";
import Card from "../components/Card.astro";
import Music from "../components/Music.astro";
const tools = ["Proxmox", "JetBrain IDEs", "Docker", "Linux", "SQLite", "Postgres", "MySQL"];
const languages = ["Go", "Python", "HTML", "CSS", "Sass", "TypeScript", "JavaScript", "Scratch", "PHP", "SQL", "Bash"];
const frameworks = ["Gin", "Echo", "Flask", "Svelte", "Astro", "raylib"];
const tools: string[] = ["Proxmox", "JetBrain IDEs", "Docker", "Linux", "SQLite", "Postgres", "MySQL"];
const languages: string[] = ["Go", "Python", "HTML", "CSS", "Sass", "TypeScript", "JavaScript", "Scratch", "PHP", "SQL", "Bash"];
const frameworks: string[] = ["Gin", "Echo", "Flask", "Svelte", "Astro", "raylib"];
const projects = await getCollection('projects');
const posts = await getCollection('posts');
---