Skip to content

Commit

Permalink
Refactor VersionCheckChangelog component to update fetching and displ…
Browse files Browse the repository at this point in the history
…aying of changelog
  • Loading branch information
Adammatthiesen committed Dec 22, 2024
1 parent 95f5017 commit 92cae2a
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,12 @@ const { link } = Astro.props;

slot.addEventListener('click', async () => {
const link = this.getAttribute('data-link')!;
const linkResponse = await fetch(link);
const jsonRes = await linkResponse.json();
const { changelog } = await (await fetch(link)).json();

frameContent.innerHTML = `
<h1>Full Changelog</h1>
<a href="${link}" target="_blank">See on GitHub ⤴</a>
${jsonRes.changelog}
${changelog}
`;

frameContainer.style.display = 'flex';
Expand Down

0 comments on commit 92cae2a

Please sign in to comment.