Skip to content

Instantly share code, notes, and snippets.

@richardherbert
Created January 13, 2026 14:34
Show Gist options
  • Select an option

  • Save richardherbert/9433542b07a14f213d221c9af49f79e7 to your computer and use it in GitHub Desktop.

Select an option

Save richardherbert/9433542b07a14f213d221c9af49f79e7 to your computer and use it in GitHub Desktop.
src/routes/secure/players/+page.server.js
// src/routes/secure/players/+page.server.js
import { supabase } from '$lib/supabaseClient';
export const load = async ( { parent }) => {
await parent();
const { data } = await supabase.from( 'players' )
.select()
.order( 'givenName', { ascending: true } )
.order( 'familyName', { ascending: true } );
return {
players: data ?? []
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment