linter error
This commit is contained in:
parent
41cb3d799c
commit
e024c4258a
1 changed files with 11 additions and 9 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue