feat: automatically detect language on server and translate UI (#530)
* feat: detect language on the server and translate page * translate auth pages * PR reviews
This commit is contained in:
@@ -1,21 +1,21 @@
|
||||
import { get } from 'svelte/store';
|
||||
import { supabase } from '$lib/utils/functions/supabase';
|
||||
import { isUUID } from '$lib/utils/functions/isUUID';
|
||||
import { QUESTION_TYPE } from '$lib/components/Question/constants';
|
||||
import { STATUS } from '$lib/utils/constants/course';
|
||||
import { isUUID } from '$lib/utils/functions/isUUID';
|
||||
import { supabase } from '$lib/utils/functions/supabase';
|
||||
import { isOrgAdmin } from '$lib/utils/store/org';
|
||||
import type {
|
||||
Lesson,
|
||||
Course,
|
||||
Exercise,
|
||||
ExerciseTemplate,
|
||||
Group,
|
||||
Groupmember,
|
||||
Exercise,
|
||||
Lesson,
|
||||
LessonCompletion,
|
||||
ExerciseTemplate,
|
||||
LessonSection
|
||||
LessonSection,
|
||||
ProfileCourseProgress
|
||||
} from '$lib/utils/types';
|
||||
import { STATUS } from '$lib/utils/constants/course';
|
||||
import type { PostgrestSingleResponse, PostgrestError } from '@supabase/supabase-js';
|
||||
import type { ProfileCourseProgress } from '$lib/utils/types';
|
||||
import { isOrgAdmin } from '$lib/utils/store/org';
|
||||
import type { PostgrestError, PostgrestSingleResponse } from '@supabase/supabase-js';
|
||||
import { get } from 'svelte/store';
|
||||
|
||||
export async function fetchCourses(profileId, orgId) {
|
||||
if (!orgId || !profileId) return;
|
||||
@@ -144,10 +144,7 @@ export async function fetchCourse(courseId?: Course['id'], slug?: Course['slug']
|
||||
|
||||
const { data, error } = response;
|
||||
|
||||
console.log(`error`, error);
|
||||
console.log(`data`, data);
|
||||
if (!data || error) {
|
||||
console.log(`data`, data);
|
||||
console.log(`fetchCourse => error`, error);
|
||||
// return this.redirect(307, '/courses');
|
||||
return { data, error };
|
||||
|
||||
Reference in New Issue
Block a user