feat: support course meta tags (#421)
* support course meta tags * fix import
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
<script lang="ts">
|
||||
import { onMount } from 'svelte';
|
||||
import { injectSpeedInsights } from '@vercel/speed-insights/sveltekit';
|
||||
import { MetaTags } from 'svelte-meta-tags';
|
||||
import { fly } from 'svelte/transition';
|
||||
import { derived } from 'svelte/store';
|
||||
import { goto } from '$app/navigation';
|
||||
import { browser, dev } from '$app/environment';
|
||||
import { page, navigating } from '$app/stores';
|
||||
import isEmpty from 'lodash/isEmpty';
|
||||
import merge from 'lodash/merge';
|
||||
import { Theme, ToastNotification, Loading } from 'carbon-components-svelte';
|
||||
import type { CarbonTheme } from 'carbon-components-svelte/types/Theme/Theme.svelte';
|
||||
import LandingNavigation from '$lib/components/Navigation/index.svelte';
|
||||
@@ -176,7 +178,7 @@
|
||||
|
||||
const orgRes = await getOrganizations(profileData.id, data.isOrgSite, data.orgSiteName);
|
||||
|
||||
const isStudentAccount = parseInt(orgRes.currentOrg.role_id) === ROLE.STUDENT;
|
||||
const isStudentAccount = orgRes.currentOrg.role_id == ROLE.STUDENT;
|
||||
|
||||
// student redirect
|
||||
if (data.isOrgSite) {
|
||||
@@ -287,10 +289,13 @@
|
||||
|
||||
$: path = $page.url?.pathname?.replace('/', '');
|
||||
$: carbonTheme = $globalStore.isDark ? 'g100' : 'white';
|
||||
$: metaTags = merge(data.baseMetaTags, $page.data.pageMetaTags);
|
||||
</script>
|
||||
|
||||
<svelte:window on:resize={handleResize} />
|
||||
|
||||
<MetaTags {...metaTags} />
|
||||
|
||||
<Theme bind:theme={carbonTheme} />
|
||||
|
||||
<UpgradeModal />
|
||||
|
||||
Reference in New Issue
Block a user