staging-org / ocean-landing-serve / src/ lib/ audience.ts
// Who a page is drawn for. `inside` is the person themself or a member of the org; `public` is anyone without access.
// There is no session in this UI, so `?as=public` previews the public view the way members check it before sharing.
export type Audience = 'inside' | 'public';
export const audienceOf = (url: { searchParams: { get(name: string): string | null } }): Audience => (url.searchParams.get('as') === 'public' ? 'public' : 'inside');