feat: use faster senja
This commit is contained in:
@@ -42,8 +42,6 @@
|
||||
-->
|
||||
<script src="https://cdn.plyr.io/3.7.3/plyr.js"></script>
|
||||
|
||||
<script async type="text/javascript" src="https://static.senja.io/dist/platform.js"></script>
|
||||
|
||||
%sveltekit.head%
|
||||
</head>
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
import { setTheme } from '$lib/utils/functions/theme';
|
||||
import TextChip from '$lib/components/Chip/Text.svelte';
|
||||
import Plan from '$lib/components/Chip/Plan.svelte';
|
||||
import { PLAN_NAMES } from 'shared-constants/src/plans/constants';
|
||||
import { PLAN_NAMES } from 'shared/src/plans/constants';
|
||||
|
||||
export let canAddOrg = true;
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
setTheme(org.theme);
|
||||
goto($currentOrgPath);
|
||||
|
||||
|
||||
open = false;
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<script lang="ts">
|
||||
import { embedSenjaWidget } from 'shared/src/senja';
|
||||
import { onMount } from 'svelte';
|
||||
|
||||
export let id = '';
|
||||
|
||||
onMount(() => {
|
||||
embedSenjaWidget(id);
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="senja-embed" data-id={id} data-lazyload="false" data-spinner="false"></div>
|
||||
@@ -6,7 +6,7 @@
|
||||
import { currentOrg, currentOrgPath } from '$lib/utils/store/org';
|
||||
import { page } from '$app/stores';
|
||||
import Checkmark from 'carbon-icons-svelte/lib/Checkmark.svelte';
|
||||
import PLANS from 'shared-constants/src/plans/data.json';
|
||||
import PLANS from 'shared/src/plans/data.json';
|
||||
import { profile } from '$lib/utils/store/user';
|
||||
import { subscribeToProduct } from '$lib/utils/services/lemonsqueezy/subscribe';
|
||||
import { snackbar } from '$lib/components/Snackbar/store';
|
||||
|
||||
@@ -5,7 +5,7 @@ import type { Writable } from 'svelte/store';
|
||||
import type { CurrentOrg, OrgTeamMember, OrgAudience } from '../types/org';
|
||||
import { ROLE } from '$lib/utils/constants/roles';
|
||||
import type { UserLessonDataType } from '$lib/utils/types';
|
||||
import { PLAN } from 'shared-constants/src/plans/constants';
|
||||
import { PLAN } from 'shared/src/plans/constants';
|
||||
|
||||
export const defaultCurrentOrgState: CurrentOrg = {
|
||||
id: '',
|
||||
|
||||
@@ -2,7 +2,7 @@ import { json } from '@sveltejs/kit';
|
||||
import crypto from 'crypto';
|
||||
import { LEMON_SQUEEZY_WEBHOOK_SECRET } from '$env/static/private';
|
||||
import { createOrgPlan, cancelOrgPlan } from '$lib/utils/services/org';
|
||||
import { PLAN } from 'shared-constants/src/plans/constants';
|
||||
import { PLAN } from 'shared/src/plans/constants';
|
||||
|
||||
export async function POST({ request }) {
|
||||
try {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import Audience from '$lib/components/Org/Audience/index.svelte';
|
||||
import { t } from '$lib/utils/functions/translations';
|
||||
import { orgAudience, currentOrgPlan, currentOrgMaxAudience } from '$lib/utils/store/org';
|
||||
import { PLAN } from 'shared-constants/src/plans/constants';
|
||||
import { PLAN } from 'shared/src/plans/constants';
|
||||
import UpgradeBanner from '$lib/components/Upgrade/Banner.svelte';
|
||||
|
||||
let isLoading = false;
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
import { currentOrg } from '$lib/utils/store/org';
|
||||
import { capturePosthogEvent } from '$lib/utils/services/posthog';
|
||||
import { globalStore } from '$lib/utils/store/app';
|
||||
import SenjaEmbed from '$lib/components/Senja/Embed.svelte';
|
||||
|
||||
let supabase = getSupabase();
|
||||
let fields = Object.assign({}, SIGNUP_FIELDS);
|
||||
@@ -125,12 +126,7 @@
|
||||
<title>Join ClassroomIO</title>
|
||||
</svelte:head>
|
||||
|
||||
<div
|
||||
class="senja-embed"
|
||||
data-id="aa054658-1e15-4d00-8920-91f424326c4e"
|
||||
data-lazyload="false"
|
||||
data-spinner="false"
|
||||
></div>
|
||||
<SenjaEmbed id="aa054658-1e15-4d00-8920-91f424326c4e" />
|
||||
|
||||
<AuthUI {supabase} isLogin={false} {handleSubmit} isLoading={loading} bind:formRef>
|
||||
<div class="mt-4 w-full">
|
||||
|
||||
Reference in New Issue
Block a user