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);
|
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>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue