2024-10-18 15:40:05 +02:00
|
|
|
const { searchParams } = new URL(window.location.href)
|
|
|
|
|
|
|
|
// Inserted during build
|
|
|
|
declare const process: { env: { NODE_ENV: string } }
|
|
|
|
|
|
|
|
export const ENV = searchParams.get('env') ?? process.env.NODE_ENV
|
|
|
|
|
|
|
|
export const PLC_DIRECTORY_URL: string | undefined =
|
|
|
|
searchParams.get('plc_directory_url') ??
|
|
|
|
(ENV === 'development' ? 'http://localhost:2582' : undefined)
|
|
|
|
|
|
|
|
export const HANDLE_RESOLVER_URL: string =
|
|
|
|
searchParams.get('handle_resolver') ??
|
|
|
|
(ENV === 'development' ? 'http://localhost:2584' : 'https://bsky.social')
|
2025-03-07 09:41:06 +01:00
|
|
|
|
|
|
|
export const SIGN_UP_URL: string =
|
|
|
|
searchParams.get('sign_up_url') ??
|
|
|
|
(ENV === 'development' ? 'http://localhost:2583' : 'https://bsky.social')
|
2025-05-20 14:37:02 +02:00
|
|
|
|
|
|
|
export const OAUTH_SCOPE: string =
|
|
|
|
searchParams.get('scope') ??
|
|
|
|
(ENV === 'development'
|
|
|
|
? 'atproto transition:generic transition:email transition:chat.bsky'
|
|
|
|
: 'atproto transition:generic')
|