Fixing svelte 5 upgrade.

This commit is contained in:
Bradley Shellnut 2024-12-04 15:01:16 -08:00
parent daada71365
commit 350c6465c3
4 changed files with 6 additions and 7 deletions

View file

@ -48,9 +48,11 @@ export async function fetchArticlesApi(
});
if (USE_REDIS_CACHE) {
console.log('Using redis cache');
const cached = await redis.get(entriesQueryParams.toString());
if (cached) {
console.log(`Cache hit for ${entriesQueryParams.toString()}!`);
const response = JSON.parse(cached);
const ttl = await redis.ttl(entriesQueryParams.toString());

View file

@ -8,8 +8,6 @@ const {
compact = false,
classes = [],
}: { articles: Article[]; totalArticles: number; compact: boolean; classes: string[] } = $props();
console.log('articles', articles);
</script>
<div>

View file

@ -11,7 +11,7 @@ export async function fetchBandcampAlbums() {
if (cached) {
const response: Album[] = JSON.parse(cached);
console.log(`Cache hit!`);
console.log('Cache hit!');
const ttl = await redis.ttl('bandcampAlbums');
return response;

View file

@ -1,5 +1,4 @@
<script lang="ts">
import { run } from 'svelte/legacy';
import { MetaTags } from 'svelte-meta-tags';
import NProgress from "nprogress";
@ -26,13 +25,13 @@
const dev = process.env.NODE_ENV !== 'production';
const siteUrl = PUBLIC_SITE_URL || 'https://bradleyshellnut.com/';
$effect(() => {
if (browser && $navigating) {
NProgress.start();
} else {
NProgress.done();
}
}
});
let metaTags = $derived({
titleTemplate: '%s | Bradley Shellnut',