Skip to content

Commit

Permalink
fix: importing sveltweet
Browse files Browse the repository at this point in the history
  • Loading branch information
ryoppippi committed Dec 28, 2024
1 parent decf930 commit 0cbb3c9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/routes/+page.server.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import type { Tweet } from 'sveltweet';
import type { Tweet as TweetT } from 'sveltweet/api';
import { LISTENERS_TWEET_IDS } from '$/lib/links';
import { retry } from '@std/async';
import { error } from '@sveltejs/kit';
import { getTweet } from 'sveltweet/api';

/* tweet を取得する。 */
export async function load() {
const tweets: Tweet[] = [];
const tweets: TweetT[] = [];
for (const id of LISTENERS_TWEET_IDS) {
const tweet = await retry(async () => {
const _tweet = await getTweet(id);
Expand Down
7 changes: 4 additions & 3 deletions src/routes/ListenersTweets.svelte
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
<script lang='ts'>
import type { Tweet as TweetT } from 'sveltweet/api';
import { Heading } from '$/lib/Heading';
import { SvelteTweet, type Tweet } from 'sveltweet';
import { Tweet } from 'sveltweet';
const { tweets }: { tweets: Tweet[] } = $props();
const { tweets }: { tweets: TweetT[] } = $props();
</script>

<section>
<Heading title='リスナーの声' />
<div data-theme='dark'>
{#each tweets as tweet (tweet.id_str)}
<SvelteTweet {tweet} />
<Tweet {tweet} />
{/each}
</div>
</section>

0 comments on commit 0cbb3c9

Please sign in to comment.