linter error

This commit is contained in:
saiminh 2026-01-19 10:03:51 +13:00
parent 41cb3d799c
commit e024c4258a

View file

@ -9,14 +9,16 @@
let Content = $state<any>(null); let Content = $state<any>(null);
// Import the markdown component dynamically and set up animations // Import the markdown component dynamically and set up animations
onMount(async () => { onMount(() => {
// Load the markdown component // Load the markdown component asynchronously
try { (async () => {
const post = await import(`../md/${data.slug}.md`); try {
Content = post.default; const post = await import(`../md/${data.slug}.md`);
} catch (error) { Content = post.default;
console.error('Error loading markdown component:', error); } catch (error) {
} console.error('Error loading markdown component:', error);
}
})();
gsap.registerPlugin(ScrollToPlugin); gsap.registerPlugin(ScrollToPlugin);
@ -188,7 +190,7 @@
</div> </div>
<div class="work-content-text"> <div class="work-content-text">
{#if Content} {#if Content}
<svelte:component this={Content} /> <Content />
{/if} {/if}
</div> </div>
</div> </div>