Support reading progress synchronization across platforms (#34)

This commit is contained in:
Huang Xin
2024-12-24 12:31:02 +01:00
committed by GitHub
parent d7ccbbcaa2
commit 9be9bc8a34
30 changed files with 1135 additions and 214 deletions
+12
View File
@@ -6,3 +6,15 @@ const supabaseAnonKey =
process.env['NEXT_PUBLIC_SUPABASE_ANON_KEY'] || process.env['NEXT_PUBLIC_DEV_SUPABASE_ANON_KEY']!;
export const supabase = createClient(supabaseUrl, supabaseAnonKey);
export const createSupabaseClient = (accessToken?: string) => {
return createClient(supabaseUrl, supabaseAnonKey, {
global: {
headers: accessToken
? {
Authorization: `Bearer ${accessToken}`,
}
: {},
},
});
};