bugfixing learning center

This commit is contained in:
MuslemRahimi 2025-02-12 13:37:19 +01:00
parent 179e92f5dc
commit f58508fbc4
2 changed files with 13 additions and 2 deletions

View File

@ -18,8 +18,13 @@ export const load = async ({ locals, params }) => {
return matchingArticle;
};
const getParams = async() => {
return params?.slug
}
// Make sure to return a promise
return {
getArticle: await getArticle(),
getParams: await getParams(),
};
};

View File

@ -3,7 +3,13 @@
import SEO from "$lib/components/SEO.svelte";
export let data;
const article = data?.getArticle;
let article = data?.getArticle;
$: {
if (data?.getParams) {
article = data?.getArticle;
}
}
</script>
<SEO
@ -80,7 +86,7 @@
</h4>
<p class="text-base text-white lg:text-lg">
Get a daily email with the top market-moving news in bullet
point format, for free.
point format, for Pro Members only.
</p>
<div>
<a