Skip to content

Commit 00323b3

Browse files
fix: update two code snippets in the tutorial (withastro#10727)
* unit 5-3: add missing `any` in Code Check-In We use `any` before to avoid a Typescript error but it is missing in the Code Check-In. So if someone decide to replace their code with the one suggested in Code Check-In they'll get a Typescript error. * unit 6-2: fix line highlighting
1 parent 24ded70 commit 00323b3

File tree

2 files changed

+2
-2
lines changed
  • src/content/docs/en/tutorial

2 files changed

+2
-2
lines changed

src/content/docs/en/tutorial/5-astro-api/3.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ Here is what your new page should look like:
210210
---
211211
import BaseLayout from '../../layouts/BaseLayout.astro';
212212
const allPosts = Object.values(import.meta.glob('../posts/*.md', { eager: true }));
213-
const tags = [...new Set(allPosts.map((post) => post.frontmatter.tags).flat())];
213+
const tags = [...new Set(allPosts.map((post: any) => post.frontmatter.tags).flat())];
214214
const pageTitle = "Tag Index";
215215
---
216216
<BaseLayout pageTitle={pageTitle}>

src/content/docs/en/tutorial/6-islands/2.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ To add interactivity to an Astro component, you can use a `<script>` tag. This s
9595
<Steps>
9696
1. Add the following `<script>` tag in `src/components/ThemeIcon.astro` after your `<style>` tag:
9797

98-
```astro title="src/components/ThemeIcon.astro" ins={9-37}
98+
```astro title="src/components/ThemeIcon.astro" ins={9-38}
9999
<style>
100100
.sun { fill: black; }
101101
.moon { fill: transparent; }

0 commit comments

Comments
 (0)