Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/marketing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dev": "astro dev",
"build": "astro build",
"preview": "astro preview",
"typecheck": "astro check"
"typecheck": "astro sync && astro check"
},
"dependencies": {
"astro": "^6.0.4"
Expand Down
14 changes: 7 additions & 7 deletions apps/marketing/src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ const themeIdeas = [
return null;
}

function pickAsset(assets, platform) {
function pickAsset(assets: {name: string; browser_download_url: string}[], platform: {os: string; label: string; arch?: string}) {
if (platform.os === "win") {
return assets.find((a) => a.name.endsWith("-x64.exe"))?.browser_download_url ?? null;
}
Expand All @@ -426,7 +426,7 @@ const themeIdeas = [
}

function initDownloadButton() {
const btn = document.getElementById("download-btn");
const btn = document.getElementById("download-btn") as HTMLAnchorElement | null;
const label = document.getElementById("download-label");
if (!btn || !label) return;

Expand All @@ -437,7 +437,7 @@ const themeIdeas = [
label.textContent = platform.label;

fetchLatestRelease()
.then((release) => {
.then((release: any) => {
const url = pickAsset(release.assets ?? [], platform);
if (url) {
btn.href = url;
Expand All @@ -458,17 +458,17 @@ const themeIdeas = [
const panels = Array.from(group.querySelectorAll("[data-tab-panel]"));
const heroOverlay = group.querySelector("[data-hero-overlay]");

const activate = (id) => {
const activate = (id: string) => {
buttons.forEach((button) => {
const isActive = button.getAttribute("data-tab-target") === id;
button.setAttribute("aria-selected", isActive ? "true" : "false");
button.dataset.active = isActive ? "true" : "false";
(button as HTMLElement).dataset.active = isActive ? "true" : "false";
});

panels.forEach((panel) => {
const isActive = panel.getAttribute("data-tab-panel") === id;
panel.hidden = !isActive;
panel.dataset.active = isActive ? "true" : "false";
(panel as HTMLElement).hidden = !isActive;
(panel as HTMLElement).dataset.active = isActive ? "true" : "false";
});

group.setAttribute("data-active-tab", id);
Expand Down
6 changes: 5 additions & 1 deletion apps/marketing/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{
"extends": "astro/tsconfigs/strict"
"extends": "astro/tsconfigs/strict",
"compilerOptions": {
"types": ["astro/client"]
},
"include": ["src", "**/*.ts", "**/*.tsx", "**/*.astro", ".astro/types.d.ts"]
}
Loading