Skip to content

Commit dac5da5

Browse files
docs(examples): Fix small errors in svelte examples (#7801)
1 parent ec8e800 commit dac5da5

File tree

22 files changed

+16
-16
lines changed

22 files changed

+16
-16
lines changed

docs/config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -990,8 +990,8 @@
990990
"to": "framework/svelte/examples/ssr"
991991
},
992992
{
993-
"label": "Optimistic Updates in TypeScript",
994-
"to": "framework/svelte/examples/optimistic-updates-typescript"
993+
"label": "Optimistic Updates",
994+
"to": "framework/svelte/examples/optimistic-updates"
995995
},
996996
{
997997
"label": "Playground",

examples/svelte/auto-refetching/src/routes/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
} from '@tanstack/svelte-query'
77
88
let intervalMs = 1000
9-
let value: string
9+
let value = ''
1010
1111
const client = useQueryClient()
1212

examples/svelte/basic/src/lib/data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { Post } from './types'
22

33
export const getPosts = async (limit: number) => {
44
const response = await fetch('https://jsonplaceholder.typicode.com/posts')
5-
const data = (await response.json()) as Post[]
5+
const data = (await response.json()) as Array<Post>
66
return data.filter((x) => x.id <= limit)
77
}
88

examples/svelte/load-more-infinite-scroll/src/app.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ h1 {
4141
padding: 2em;
4242
}
4343

44-
#app {
44+
main {
4545
max-width: 1280px;
4646
margin: 0 auto;
4747
padding: 2rem;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<script>
1+
<script lang="ts">
22
import LoadMore from '../lib/LoadMore.svelte'
33
</script>
44

5-
<h1>Infinte Load More</h1>
5+
<h1>Infinite Load More</h1>
66
<LoadMore />
File renamed without changes.

examples/svelte/optimistic-updates-typescript/package.json renamed to examples/svelte/optimistic-updates/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@tanstack/query-example-svelte-optimistic-updates-typescript",
2+
"name": "@tanstack/query-example-svelte-optimistic-updates",
33
"private": true,
44
"type": "module",
55
"scripts": {

0 commit comments

Comments
 (0)