Skip to content

Commit

Permalink
Add supabase anon client
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniils Petrovs committed Jun 9, 2024
1 parent 297caa3 commit c79abc9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/routes/+page.ts
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
export const prerender = true;
import { supabase } from '../supabase-client';
import type { PageLoad } from './$types';

export const ssr = false;

export const load = (async () => {
const { data } = await supabase.from('stamps').select('*');

return { stamps: data };
}) satisfies PageLoad;
7 changes: 7 additions & 0 deletions src/supabase-client.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { createClient } from '@supabase/supabase-js';

const supabaseUrl = 'https://xywgwitzwfoqknoctrmj.supabase.co';
const supabaseKey =
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Inh5d2d3aXR6d2ZvcWtub2N0cm1qIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MTYyMTE1ODksImV4cCI6MjAzMTc4NzU4OX0.-bQT8up9g6s8gSbaC6p-zdDEm9Gy5vBB9MRMJCo9efk';

export const supabase = createClient(supabaseUrl, supabaseKey);

0 comments on commit c79abc9

Please sign in to comment.