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; return matchingArticle;
}; };
const getParams = async() => {
return params?.slug
}
// Make sure to return a promise // Make sure to return a promise
return { return {
getArticle: await getArticle(), getArticle: await getArticle(),
getParams: await getParams(),
}; };
}; };

View File

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