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