whoa svelte is here
Co-authored-by: Astra <Astrrra@users.noreply.github.com>
This commit is contained in:
parent
76d837320d
commit
3f03c12152
24 changed files with 1080 additions and 16 deletions
19
web/src/App.svelte
Normal file
19
web/src/App.svelte
Normal file
|
@ -0,0 +1,19 @@
|
|||
<script lang="ts">
|
||||
import PostComponent from "./lib/PostComponent.svelte";
|
||||
import { fetchAllPosts, Post } from "./lib/pdsfetch";
|
||||
const postsPromise = fetchAllPosts();
|
||||
</script>
|
||||
|
||||
<main>
|
||||
{#await postsPromise}
|
||||
<p>Loading...</p>
|
||||
{:then postsData}
|
||||
{#each postsData as postObject}
|
||||
<PostComponent post={postObject as Post} />
|
||||
{/each}
|
||||
{/await}
|
||||
</main>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
Loading…
Add table
Add a link
Reference in a new issue