feat: 🚀 😃 convert repo into a monorepo 🚀 😃 (#51)
* Merge main into turbo-monrepo * feat: rename apps * feat: remove supbase videos and serve all from project * feat: move supabase to root * feat: update README * docs: update link
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { fetchCourse } from '$lib/utils/services/courses';
|
||||
import { supabase, getSupabase } from '$lib/utils/functions/supabase';
|
||||
|
||||
if (!supabase) {
|
||||
getSupabase();
|
||||
}
|
||||
|
||||
export const load = async ({ params = { slug: '' } }) => {
|
||||
const { data } = await fetchCourse(undefined, params.slug);
|
||||
|
||||
return {
|
||||
slug: params.slug,
|
||||
course: data
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,22 @@
|
||||
<script lang="ts">
|
||||
import CourseLandingPage from '$lib/components/CourseLandingPage/index.svelte';
|
||||
import type { Course } from '$lib/utils/types';
|
||||
|
||||
interface Data {
|
||||
course: Course;
|
||||
}
|
||||
|
||||
export let data: Data;
|
||||
|
||||
let courseData: Course;
|
||||
|
||||
function setCourseData(course: Course | null) {
|
||||
if (!course) return;
|
||||
|
||||
courseData = { ...course };
|
||||
}
|
||||
|
||||
$: setCourseData(data.course);
|
||||
</script>
|
||||
|
||||
<CourseLandingPage {courseData} />
|
||||
Reference in New Issue
Block a user